-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sync launch.json with project files #75
Comments
Thanks, I've managed to debug the target without the launch.json file as you suggested. Is there a way I could set up non-iar task that could potentially use this method to debug and add my preLaunchTask? Trouble is that I'm so used to IAR building the project before debugging, that this will cause me a lot of headache :) Can I, perhaps, create a command line script for a task if CSPY supports this? I think going forward your suggestion would be really convenient |
Unfortunately, there is no command line interface to the VS Code debugger or our launch.json generator. I can't think of any other quick solutions to make this easier, either. To clarify, with my suggestion above, you would be able to define a minimal launch.json configuration like this: {
"type": "cspy",
"request": "launch",
"name": "Debug with C-SPY",
"preLaunchTask": "iar: Build Project",
"workbenchPath": "${command:iar-config.toolchain}",
"projectPath": "${command:iar-config.project-file}",
"projectConfiguration": "${command:iar-config.project-configuration}",
}, This just says to debug the project and configuration currently selected in the "IAR Build" extension GUI, but not how to debug. All the details, like the program path and driver, would be filled in from the project files every time you launch it. |
Sorry, I might have been a bit unclear: This type of "minimal" launch.json configuration is not something we support yet. I've created a feature request for it internally and we'll consider implementing it in a future release. Until then, the best suggestion I can give is to debug without a launch.json file as I described in my first message. |
Ah, I see! Thanks, we will wait for the new release |
Is there a way to automatically sync the launch.json file with the IAR project files? At the moment if the user changes a debug setting in IAR when the launch.json file already exists, the change does not sync to the VSCode environment. I could create tools to parse the relevant files and update the launch.json on a trigger (eg before a Launch task), but it seems like i'd be reinventing the wheel...
Since Run > Add configuration: IAR C-SPY Debug command can automatically create a basic template file, I was wondering if I could somehow access this "parsing tool". I would also like to add the extra "preLaunchTask": "iar: Build Project" key to the template file by default.
The text was updated successfully, but these errors were encountered: