-
Notifications
You must be signed in to change notification settings - Fork 136
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
Vscode debug #297
base: develop
Are you sure you want to change the base?
Vscode debug #297
Conversation
.vscode/launch.json
Outdated
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "gcc-9 - Build and debug speed tester", |
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.
We should fix this name since this doesn't actually build the code
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.
I changed it to gcc-9 - Debug speed tester
@@ -0,0 +1,27 @@ | |||
{ | |||
"tasks": [ | |||
{ |
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.
We either need to fix this so it works and can compile the code or delete it
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.
Not sure what you mean. Are you referring to the entire file or those 3 lines?
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.
I mean this tasks
section. You can just delete it
@@ -0,0 +1 @@ | |||
pkexec /usr/bin/gdb "$@" |
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.
We should have a header comment explaining what this file is for
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.
Not sure I entirely understand the purpose of this file. I think it allows administrator privileges for gdb, which is why the pkexec command is used, but I don't think I can succinctly summarize it in a comment
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.
Here is a suggestion:
pkexec /usr/bin/gdb "$@" | |
# This is a wrapper script for GDB that allows it to run as root. This is necessary if you are calling | |
# gdb from an IDE like VS Code that by itself does not run as root. | |
# NOTE: In some cases we have found that you must use `sudo` instead of `pkexec` here. | |
pkexec /usr/bin/gdb "$@" |
We will need to test this on a few different setups to understand whether to use sudo
or pkexec
. My memory is that when we tried to use this on Noah's machine it only worked with sudo
, but on yours you needed pkexec
. We will want to set this to whichever is needed on CloudLab since it is our "standard" platform.
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.
A few suggestions
@@ -0,0 +1,27 @@ | |||
{ | |||
"tasks": [ | |||
{ |
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.
I mean this tasks
section. You can just delete it
@@ -0,0 +1 @@ | |||
pkexec /usr/bin/gdb "$@" |
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.
Here is a suggestion:
pkexec /usr/bin/gdb "$@" | |
# This is a wrapper script for GDB that allows it to run as root. This is necessary if you are calling | |
# gdb from an IDE like VS Code that by itself does not run as root. | |
# NOTE: In some cases we have found that you must use `sudo` instead of `pkexec` here. | |
pkexec /usr/bin/gdb "$@" |
We will need to test this on a few different setups to understand whether to use sudo
or pkexec
. My memory is that when we tried to use this on Noah's machine it only worked with sudo
, but on yours you needed pkexec
. We will want to set this to whichever is needed on CloudLab since it is our "standard" platform.
When I used your |
added relevant files needed to use the VSCode debugger while running the speed tester nf