I am writing a small Linux app using Visual Studio 2015. To do so, I am using the Visual Studio 2015 Linux Extension, v 1.0.7 (the latest version as I'm writing this post).
I can compile and run the app on the remote environment using gdbserver
, but I can't use breakpoints. I don't get why.
Details:
The target environment is a remote Ubuntu 64, on which g++
, gdb
and gdbserver
have been upgraded today.
The extension works in that sense the C++ code is properly sent to the remote environment and properly compiled as a result of pressing F7:
- My code (I am using some toy code for this post)
- The resulting build log
The code is also properly executed remotely using gdbserver when I'm running it: the output is properly sent back by gdbserver
as I can view it in VS's Linux Console Window.
My problem: when I set a breakpoint in my code (as in line 7 of my code above), it is just ignored. And when I just press F11 to start debugging straight at startup, the program just runs as if I wasn't debugging.
I'm wondering whether this is tied to the debugging from host 127.0.0.1
message above.
Of course I'm in debug mode when trying:
- Optimizations are disabled:
- Symbols are there:
- And debug settings are by default. I left them unchanged after having installed the extension. There are no ports set, could it be the cause?
- And finally, I can do some step-by step debugging if I replace
gdbserver
bygdb
in my debug configuration above, and if I useF10
(or any other stepping option), notF5
, to start debugging. The drawbacks being that I lose the Linux Console and I still can't set breakpoints, they are ignored. I have to step during the whole execution path:
This is the first time I am trying this Linux Extension with a remote environement. I was formerly using it with a local Cygwin and had no issues with breakpoints. But this was the previous version (1.05) of the Visual Studio 2015 Linux Extension so this does not prove anything.
Any idea?