Skip to content

Commit

Permalink
Add VSCode native debug launcher that attaches to java process.
Browse files Browse the repository at this point in the history
In my experience on linux searching for "executor" brings up  the "Gradle Test Executor" java process of interest when debugging tests hanging in native code.

Note that the sourceFileMap assumes that that wpilib source is installed under $HOME/git/allwpilib. If it isn't, you can still see stack traces, you just won't be able to see the wpilib source.

The "program" location probably needs a windows specific version, maybe with ${env:HOME} replaced with ${env:ALLUSERSPROFILE}?
  • Loading branch information
brettle committed Jul 16, 2024
1 parent 10f32c8 commit 83dede4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${env:HOME}/wpilib/2024/jdk/bin/java",
"sourceFileMap": {
"/work/": "${env:HOME}/git/allwpilib/"
},
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"type": "java",
"name": "Launch Extern Controller",
Expand Down

0 comments on commit 83dede4

Please sign in to comment.