How can I debug a launch configuration? - visual-studio-code

We have a new team member trying to get started with our Godot project. VSCode is our standard editor. Everyone is using Fedora Linux. You can find the relevant files here:
https://github.com/redhat-gamedev/srt-godot-server/tree/main/.vscode
On my machine, when trying to run the launch configuration, the build task succeeds, and then the program is launched. Everything works fine.
On the new team member's machine, when trying to run the launch configuration, the build task succeeds, and then nothing happens. There are no errors. There is no output.
We tried running VSCode with an increased log level (debug), but the VScode log files don't show anything meaningful or related. We tried executing the equivalent launch command from the terminal/shell and it works fine. There are no errors, but the resulting built program executes successfully. Interestingly, running code --verbose does produce a ton of output but nothing super specific to the execution of the steps in the launch configuration. Also, code --verbose --log debug does not cause messages spit out of VSCode to be at the DEBUG log level. Everything is still INFO:
[4183395:0112/092541.932947:INFO:CONSOLE(616)] "%cTRACE color: #888 [File Watcher (parcel)] [CHANGED] ...
How can I debug a launch configuration in VSCode to see what's going on? Is there a way to make the launch configuration system of VSCode be more verbose?

Related

run cmake-tools targets in same terminal

I'm remotely developing a project based on yocto and I'm trying to set up remote debugger for my x86 target.
Obviously it is not working, but I can't see any logs - launching any target via cmake-tools GUI runs a new terminal and removes the command issued by the addon, so I can't really see what cmake-tools is trying to do.
e.g. if I run a simple UT - all the output I get is test result, but I can't see the path to the binary file.
Is there a way to keep all the output in a single terminal, and to not remove commands issued by the addon?

Why terminal becomes unresponsive after Parcel build?

I am following Parcel's "Building a web app with Parcel" to learn how to use it. The problem arises after I type in npx parcel src/index.html. The build runs fine and I can see the development server results just fine. The terminal becomes unresponsive afterwards. I can't type, quit, or anything. The only workaround is killing the terminal and restarting...which is very annoying. I've looked for answers, I've updated Node to the latest version, but to no avail. This doesn't happen when I use Webpack or any other time. Here is a screen shot just in case that helps. Could someone please help this unworthy noob out? Screen shot of terminal and VSCode
When you just run npx parcel, it starts a development server that will continue to run until you exit. This development server will watch for changes that you make as you develop and will reload your project, so you don't need to restart/rebuild every time you make changes.
The reason you can't type anything into the terminal (or, at least, that the terminal doesn't respond when you do) is that the development server is still running in that terminal. You have to exit the development server before the terminal prompt will re-appear and you can use it as normal.
To exit any program running in a terminal, you can type Control+C (hold down the Control key and hit the "c" key). This works for any terminal program, not just parcel. This will exit the development server program and you'll get your terminal prompt back.
There are other things you can do with programs (or "jobs") in the terminal window. You can read more about them here and here.
But you should use the development server to your advantage. Keep it running while you work. If you need to use the terminal while it's running, just open up another terminal window.
When you finally want to build your app/site, run parcel build instead.
You can read more about all of this here: https://parceljs.org/getting-started/webapp/

Run a local command before starting eclipse debugging

I want to run a terminal command just before a debug configuration starts on Eclipse.
I heard about CDT launch Groups, but couldnt get around it fully. I need to just run a normal terminal command, nothing fancy.
The aim is to copy some stuff over to the execution path before actually starting the debugging.
I managed to do this via "Launch Groups" in the CDT. Creating 2 groups, one as a c/C++ Application which calls a shell script that includes the command I want to run. And then the normal debug configuration I wanted to execute.

VSCode: Freezes after compilation

I tried to compile VSCode source for the first time ever, I ran the "yarn run watch" command and eventually the compilation finished with the message "Finished Compilation with 0 errors" but then the console just gets stuck there. I tried using different consoles but still facing the same problem.
I killed the process and had no later problems using VS Code from this build.
In the directory where vscode was cloned, I checked with du -s that nothing was changing over a few minutes of testing will the logging was stopped on your message above.
Having stopped yarn run watch I then carried out the next instruction of the build process: yarn watch.
This also hung with the same message. I used du again. And again there was no change in the size of the directory. I stopped yarn watch and was then able to run vscode, editing files without a problem.
All custom commands like watch that you can yarn run are defined in the file package.json in the project root. In this case, it's package.json on Github. Even before looking at it, I assumed from the name that what the command does is probably to build once and then go into a loop that watches for new changes and then rebuilds. In the section called scripts of package.json we see that watch is defined to be gulp watch --max_old_space_size=4095. Google gulp watch, and you'll see that that's what it does.
I think you're looking for yarn run compile, which the vscode team setup to build the project once and then exit.

How to have change debugger setting in Eclipse for a launch file

His,
I have been trying to find out why starting DevMode with Debugger from Eclipse was so slow and noticed in the list of processes on my machine the following line:
/usr/lib/jvm/jdk1.6.0_14/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:47248 ...
Apparently the application is suspended to wait until the debugger is connected which takes about 2 minutes. I would like to set "suspend=n". Does anyone know where I could set this directive. The vm section in Eclipse launch configuration is empty and if I paste the updated debugger config there is a error telling that the values are entered twice.
As I understand it, Eclipse takes this config from somewhere and inserts it automatically when I run launch configurations in debugger mode.
Thanks
You can't remove that parameter and, if you could, it wouldn't make a difference. When you connect a new browser to the GWT OOPHM instance it has to compile the entire project for use in development mode. This is what takes time, not waiting for the debugger to attach.