Recent

Author Topic: IDE error - Can't run a unit  (Read 5714 times)

CyberFilth

  • Jr. Member
  • **
  • Posts: 88
    • My github account
IDE error - Can't run a unit
« on: September 08, 2021, 05:24:37 pm »
I've come across an unhelpful error in FP IDE when trying to run a program "Can't run a unit", with no indication of which unit.

I'm trying to debug a console application which crashes under certain situations.
Lazarus on Ubuntu doesn't seem to allow me to run a console application from the editor (it used to, and the option is still there but it doesn't work on Lazarus 2.0.12).

The application uses the Video unit, so I can't capture the error message when running it from the terminal.
To get around this I've been debugging by using Free Pascal's text mode IDE, which is just fine for my needs. It allows me to run the application from the IDE and set breakpoints / capture error messages etc.
But today it gave me this error. My debugging has kind of stalled unless I can figure out which unit it's referring to.

Compilation works from the IDE with no errors, only running it triggers this error. Is there any way of finding which unit is causing issues?
Running Windows 10 & Xubuntu 20.04 | Lazarus 2.0.12 | FPC 3.2.0

CyberFilth

  • Jr. Member
  • **
  • Posts: 88
    • My github account
Re: IDE error - Can't run a unit
« Reply #1 on: September 08, 2021, 05:39:44 pm »
Typical that I figure out the solution as soon as I post for help in a forum!

My fp.cfg file had paths to all the units needed in the Release section, but not in the Debug section.
Which is why it ran fine normally, but not when debugging. Unusual that it didn't specify the name of the missing unit but ho hum!
Running Windows 10 & Xubuntu 20.04 | Lazarus 2.0.12 | FPC 3.2.0

 

TinyPortal © 2005-2018