VSCode extensions - unbound breakpoint - debugging

I've been learning VSCode language server development using this official example but I've been unable to debug it. I get "Unbound breakpoint" problems when I set breakpoints and start the debugger.
I believe it should be possible to debug VSCode extensions. Could something be wrong with my environment?

Related

Ocean API: A debugger has been found running in your system. Please, unload it from memory and restart your program

I wrote a simple code in Ocean API. When i want to start it without debugging it works and i can see the plugin in Petrel. However when i try to debug it a message appears:
cEngineer.dll A debugger has been found running in your system.Please, unload it from memory and restart your program.
Error- Debugging Mode
How can i solve this issue?
Many Thanks,
Petrel cannot be started in Debug mode. You can attach the debugger to it after it is launched. One trick to get the debugger attached early in your plug-in code is to place:
Debugger.Launch();
in your IModule.Initialize method.
The 64-bit version of Petrel is hardened against reverse engineering during initialization, but the previous answer is correct: attaching later (e.g. with Debugger.Launch(), or manually after the UI has appeared) works fine.
Alternatively, you can use the developer-only 32-bit build of Petrel (check the Ocean developer site). Pure .NET-based plugins will work fine, and it can be launched directly in the VS debugger.

QtCreator + gdb on Mac OS X Yosemite doesn't give me source level debug info

Debugger shows me dissassembler code, while i am trying to step over the instructions of my program.
Using lldb under QtCreator.
Interesting thing is: debugging works fine, if i use it without QtCreator (via terminal)
Small projects seems to debug normally... So I've try to add peaces of my project gradually to small one.
I've found a peace of code, that resulting to crash:
QVector<myClass>::contains();
But if i try to make an empty project only with this realisation, problem disappeared.
I've lost about a week, trying to solve it.
Any ideas, what can go wrong?
EDIT:
Well, QtCreator still using GDB instead of LLDB, that i refer it to...
Looks like bug

kdevelop debugger automatically detaches from a process after a few steps

I am trying to debug a few C++ applications with KDevelop 4.0.1(on KDE 4.4.5 and gdb 7.0.1) on Debian 6.0.6. Irrespective of what part of the code I break into, the debugger detaches automatically after stepping through a few instructions. I didn't find anything on this topic on any forums. I tried a few things below.
Debugging using gdb on shell works perfectly fine.
Tried debugging multiple applications, but the issue is seen.
Reinstalling KDevelop did not help.
Am I missing some configuration that could cause this behavior?
(I am new to kdevelop)
Thanks for any help.
My guess is that is related to pretty printing of an uninitialized variable.
Lots of fixes have been applied to KDevelop and gdb, you should consider updating to a more recent version.

How to tell if (VB) code is running inside Visual Studio?

I'm using VB Express 2008. I know how to tell if code was built in debug more or release, but now I would like know how to tell if it is running in the Visual Studio IDE or not (so that I can add some debug MsgBox() and not worry about them showing if I ever accidentally ship a debug version).
Is System.Diagnostics.Debugger.IsAttached what you're looking for?
If you're building for Test and Prod, consider using a preprocessor directive in your code.
#If DEBUG Then
MsgBox("Foo")
#End If
This falls down, of course, if you ship a debug-built binary to a non-dev environment. I understand this is attacking the problem from another angle from where you asked the question (the IDE).
Try checking the IsAttached property of System.Diagnostics.Debugger
If you want to make sure you never show debug messages to users, you can use Debug.Write() and Debug.WriteLine(). These commands will output the text supplied to the debug output window. Note that you can attack a debug output window to a program running production code on a customer's machine without installing a development environment!
Testing for an attached debugger does not indicate that the debugger is also inside an IDE. It is quite common in many environments to attach debuggers to production code running on a customer system to identify what is going wrong on a particular customer's installation and usage. Testing for a debugger and then presuming you are in an IDE will foul out this usage of debuggers in a production environment.

Qt Creator Debugging

I'm using QT Creator on 3 platforms to create platform independent software. However, I'm getting a segmentation fault with the exact same code in Windows only. That doesn't sound so bad because I can use the debugger. Except, no matter how many breakpoints I set or where I set them, they are ignored by the debugger. I am 100% sure that my control flow is going through the breakpoint but not breaking the flow.
Any thoughts? How can that happen?
Doh! I was using Cmake with Qt and I failed to set the CMAKE_BUILD_TYPE variable. That was it!

Resources