Debug Configurations - is it possible to run a few lines of code or a script file prior to debug session start?
Hi,
I have some commands Im running eveny time a script is being debug. this are mainly viewing commands to allow better console printing. I so that i can run an external tool before debug starting using Debug configurations, but i didnt see no script running possibility. I dont want to make my scripts dirty by inserting at each one the commands needed.
Any solution?
I have some commands Im running eveny time a script is being debug. this are mainly viewing commands to allow better console printing. I so that i can run an external tool before debug starting using Debug configurations, but i didnt see no script running possibility. I dont want to make my scripts dirty by inserting at each one the commands needed.
Any solution?
Please sign in to leave a comment.
Then, go to your run configuration (click on the dropdown in the toolbar, choose Edit configurations...) and at the bottom of the dialog there's the actions that are performed before launching an application.
Clicking on plus, you'll be able to add "Run external tool" to the list of operations that should be executed before your application. There's no way to directly insert a bunch of commands, but this should be a viable workaround.
Please note, that this only affects the current run configuration. But in the tree on the right, you can expand the node "Defaults" and make the same settings for a particular type of run configurations (e.g. all Python applications or unit tests). There's no way however, to distinguish between executing as run or debug configuration.