-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev] vscode debug launch.json #1537
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1537 +/- ##
==========================================
- Coverage 84.63% 84.57% -0.06%
==========================================
Files 156 156
Lines 4795 4795
==========================================
- Hits 4058 4055 -3
- Misses 737 740 +3
|
Should we commit IDE setting to repository?Different users use different IDE and toolchains. |
We discussed this PR in the SIG meeting. I think it is good to at least have something minimal if everybody agrees of course. |
LGTM. I don't see how this can hurt, and it will increase our productivity. |
Looks like OpenTelemetry C++ is not the first one https://github.com/open-telemetry/opentelemetry-specification/blob/main/.vscode/settings.json. |
.vscode/launch.json
Outdated
"valuesFormatting": "parseText" | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider adding a blank new line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done
"name": "Debug", | ||
"type": "gdb", | ||
"request": "launch", | ||
"target": "${workspaceFolder}/bazel-bin/<path to the bin file>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bazel specific and some some manual update for CMake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be used with CMake too, just need to change the target path.
"cwd": "${workspaceRoot}", | ||
"valuesFormatting": "parseText" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add the configuration for Windows too? Something like this should work.
{
"name": "Debug on Windows",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/<path-to-bin-file>",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, added
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
Adds vscode launch.json
launch.json is needed for debugging in VS code.
Changes
how to use:
build in debug mode e.g. bazel:
--compilation_mode=dbg
or CMake with:
-DCMAKE_BUILD_TYPE=Debug
change the target to the executable of interest e.g.
curl_http_test
:"target": "${workspaceFolder}/bazel-bin/ext/test/http/curl_http_test"
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes