* * *

Author Topic: Unable to Debug Project  (Read 476 times)

R0b0t1

  • Full Member
  • ***
  • Posts: 171
Unable to Debug Project
« on: February 04, 2018, 04:22:24 am »
When attempting to run my "Simple Program" project, I receive the following in a dialog stating there was an error:
Code: [Select]
The GDB command:
"-break-insert +0"
returned the error:
",msg="No line 6 in the current file.""

Code: Pascal  [Select]
  1. program Test;
  2.  
  3. begin
  4.   WriteLn('Hello, world!');
  5. end.

When run without debugging it works properly, but I see no output.

Code: [Select]
[I] sys-devel/gdb
     Available versions:  *7.9.1 7.10.1 7.12.1 ~8.0 ~8.0.1 ~8.0.1-r1 **9999 {+client expat lzma multitarget nls +python +server test vanilla xml zlib PYTHON_SINGLE_TARGET="python2_7 python3_4 python3_5 python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  7.12.1(08:24:08 PM 01/04/2018)(client nls python server -lzma -multitarget -test -vanilla -xml PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5")
     Homepage:            https://sourceware.org/gdb/
     Description:         GNU debugger

[I] dev-lang/fpc
     Available versions:  2.6.4^s (~)3.0.0^s (~)3.0.2^s (~)3.0.2-r1^s (~)3.0.4^s {doc ide source}
     Installed versions:  3.0.4^s(12:29:42 AM 01/24/2018)(source -doc -ide)
     Homepage:            https://www.freepascal.org/
     Description:         Free Pascal Compiler

[I] dev-lang/lazarus
     Available versions:  1.0.12^s (~)1.6.2^s (~)1.6.4^s (~)1.8.0^s {minimal}
     Installed versions:  1.8.0^s(12:37:07 AM 01/24/2018)(-minimal)
     Homepage:            https://www.lazarus-ide.org/
     Description:         Lazarus IDE is a feature rich visual programming environment emulating Delphi
/code]

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4572
    • wiki
Re: Unable to Debug Project
« Reply #1 on: February 04, 2018, 04:45:42 am »
I will have to look into the "no line 6" error.

But you can probably ignore this error, your program was still run. At least that happened to me, I got the error, I clicked ok, and the program run.

I guess you are on windows?

If that program runs, you will not see much. There will be a black console window, for a short moment, and then it closes, and that it is.

On windows, the console belongs to the program. So if the program exits, the console closes.
Your program just writes a line of text (that takes milliseconds only). Then the console closes.

If you run from an external cmd.exe, then the console belongs to cmd.exe, and stays open.

If you run inside the IDE, just do a
Code: Pascal  [Select]
  1. readln;
at the end, to keep the console open. (the app runs untill you press a key)

----------
if you are on linux, go to menu: view > debug window > terminal output

------------------------
If the error (no line 6) bothers you:

The easiest is to add an empty line before the "end."
(Don't know why / but at least works for me)

If you add more code, the error probably goes away too.



 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus