Skip to content
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

Enable pretty printing for GDB. #498

Merged
merged 4 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/debugger/configuration/resolvers/ros1/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ export class LaunchResolver implements vscode.DebugConfigurationProvider {
args: request.arguments,
environment: envConfigs,
stopAtEntry: stopOnEntry,
setupCommands: [
{
text: "-enable-pretty-printing",
description: "Enable pretty-printing for gdb",
ignoreFailures: true
}
]
};
debugConfig = cppdbgLaunchConfig;
}
Expand Down
11 changes: 9 additions & 2 deletions src/debugger/configuration/resolvers/ros2/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class LaunchResolver implements vscode.DebugConfigurationProvider {
args: request.arguments,
environment: envConfigs,
stopAtEntry: stopOnEntry,
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] fix brace indent

};
debugConfig = cppvsdbgLaunchConfig;
}

Expand Down Expand Up @@ -223,7 +223,14 @@ export class LaunchResolver implements vscode.DebugConfigurationProvider {
args: request.arguments,
environment: envConfigs,
stopAtEntry: stopOnEntry,
};
setupCommands: [
{
text: "-enable-pretty-printing",
description: "Enable pretty-printing for gdb",
ignoreFailures: true
}
]
};
ooeygui marked this conversation as resolved.
Show resolved Hide resolved
debugConfig = cppdbgLaunchConfig;
}

Expand Down
2 changes: 1 addition & 1 deletion src/debugger/vscode-cpptools.launch.json.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface ICppdbgLaunchConfiguration {
/**
* One or more GDB/LLDB commands to execute in order to setup the underlying debugger. Example: \"setupCommands\": [ { \"text\": \"-enable-pretty-printing\", \"description\": \"Enable GDB pretty printing\", \"ignoreFailures\": true }].
*/
setupCommands?: Array<{ text: string; type: string; ignoreFailures: boolean; }>;
setupCommands?: Array<{ text: string; description: string; ignoreFailures: boolean; }>;

/**
* If provided, this replaces the default commands used to launch a target with some other commands. For example, this can be \"-target-attach\" in order to attach to a target process. An empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command line options. Example: \"customLaunchSetupCommands\": [ { \"text\": \"target-run\", \"description\": \"run target\", \"ignoreFailures\": false }].
Expand Down