question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No line in file (from break-insert)

See original GitHub issue

I’m not certain if this is an issue related to cortex-debug or not, since it seems like it might be a configuration issue, but it a problem I have not had with VS Code before. (My previous experience with the debugger is through PlatformIO. This is my first try at building for ARM without PlatformIO.)

I’m using Windows 10, VS Code with the C++ extension, and a J-Link EDU Mini.

When I start a debug session with cortex-debug, VS Code opens my main.cpp and the program halts at the start of the main function as expected. However, regardless of what line a breakpoint is set on, a message such as the following will appear.

"No line 19 in file "c:\Projects\Mbed\blinky1\main.cpp". (from break-insert "c:\\Projects\Mbed\\blinky1\\main.cpp:19")

What’s really odd about this is that I can step through the code and VS Code seems to recognize the lines. For example, if you look at the call stack in this screenshot where I stepped through to line 19, VS Code clearly realizes that the program is currently halted on line 19. Below that in “breakpoints” it shows that there should be a breakpoint at line 19, but then there’s that error message on the bottom right.

debugging

I’ve dug through the various cmake logs and it appears that the proper flags are set, and (as shown in the screenshot) it appears to be reading the symbols from the binary.

Any suggestions as to what is going on here would be appreciated!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
haneefdmcommented, Jun 11, 2021

I was looking at this and it does not list it

Version dependent I guess.

0reactions
pearsoncommented, Jun 25, 2021

I look forward to hearing your results!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line Breakpoint problems again - C / C++ IDE (CDT) - Eclipse
breakpoints on some lines and I get in the console in 'Red' (gdb) 358-break-insert nest.cpp:6 &"No line 6 in file \"../src/nest/nest.cpp\".
Read more >
Debugging with GDB - GDB/MI Breakpoint Table Commands
The breakpoint number number is not in effect until it has been hit count times. ... source file which contains this function, and...
Read more >
Post - foundry27
Attached file demonstrates the behaviour. How to reproduce: Start debugging an application, ... There is NO WARRANTY, to the extent permitted by law....
Read more >
Debugging with gdb - The gdb/mi Interface - Apple Developer
logical location of the breakpoint, expressed by function name, file name, line number; `Times': number of times the breakpoint has been hit. If...
Read more >
[Mingw-users] possible regression in gdb 7.4 with -break-insert +0
&"Error in re-setting breakpoint 2: No line 0 in file \"WatchesPrg.pas\".\n" =breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="n" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found