You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityinfo-neededIssue requires more information from poster
Currently we have the ability to specify a preLaunchTask in launch.json configurations. This is extremely helpful in running a task that should kick off before launch.
Conversely, there could be post launch tasks that would be helpful to automate their execution. An example of a post launch task would be to, after the launch of the application, open a browser window with a specific URL to the current application.
In summary, a postLaunchTask would be helpful as preLaunchTask is.
Reacted by Felix Becker, newbrain, Rei Vilo, Gregor Woiwode, Frank Strieter, Meirion Hughes, Caleb St-Denis, ChrisP, Michael Ovchinnikov, Jarvis Prestidge and 33 more
Andre Weinand (@weinand) any updates on the progress of the postLaunchTask feature? Or perhaps, do you know of any existing extensions that can perform a similar function?
Is it possible to support this for compound launch configs - so that, for example, once all my node-js processes are up, inject some scenario data or clear the DB from previous experiment....
roblourens in our usecase we are generating some code during the build step and we want to then bundle the generated code. It would be ideal to run the tasks that bundle the generated code as a postLaunchTask. For now we are just manually running the tasks after the build is done.
We're using VS Code and a well-supported VS-code extension to deploy code to Roku.
I want to bundle the files generated into out/.roku-deploy-staging after roku-deploy has created them with a hypothetical postLaunchTask after the launch task that we invoked with F5 completes.
Does anyone have a scenario that can't be covered with that feature?
Yes, Refer to my comment above. With debuggers for embedded targets like the JLink Cortex ARM debugger you cannot use the postLaunch task because the debugger is not active yet. Certain things can only be done after the debugger has been started and at present those cannot be automated due to a missing postLaunchTask.
Adell (@adellhk) I still don't understand why it makes sense to bundle or deploy these files after debugging has already started.
Henrik Maier (@hwmaier) thanks for the explanation. As a workaround it would probably be easy for someone to write an extension that essentially implements a postLaunchTask.
I also have the same scenario as Henrik Maier (@hwmaier) , also in embedded.
I quite often want to attach a program (e.g. a terminal, or J-Link RTT Viewer) to a running debugger, but (without modifying the program) it won't work unless the debugger process has been started.
For this use case, postLaunchTask would be very useful
Thanks. One reason I'm still hesitant to put this in vscode is that "postLaunch" is hard to define. There are multiple points in the debug setup flow that could be considered "postLaunch", and even then, there is no guarantee that the debuggee is in the right state that you need it in to be able to do what you want to do with it, and so I think a general "postLaunchTask" isn't the right direction.
Instead you might try to write an extension that can do what you want. For an example, you can see what we did for the serverReadyAction feature with this extension:
We were solving the same problem there - for example, just because the web server process has started and a debugger has attached, it doesn't mean that the server is ready to handle requests, so we need to watch for a custom output string to know when the web server is ready.
debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityinfo-neededIssue requires more information from poster
Activity
theBull commentedon Aug 31, 2017
Andre Weinand (@weinand) any updates on the progress of the
postLaunchTaskfeature? Or perhaps, do you know of any existing extensions that can perform a similar function?isidorn commentedon Sep 1, 2017
We accept PRs that fix this.
Here's a code pointer on how
preLaunchTaskis implementedhttps://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/debugService.ts#L892
cleidigh commentedon Nov 28, 2017
tstringer
Isidor Nikolic (@isidorn)
I will pick this up for December...
markm77 commentedon Jul 21, 2018
Is it possible to support this for compound launch configs - so that, for example, once all my node-js processes are up, inject some scenario data or clear the DB from previous experiment....
9 remaining items
roblourens commentedon Dec 14, 2022
Since the original use-case mentions launching a browser after a server has started, I wonder whether https://code.visualstudio.com/docs/editor/debugging#_automatically-open-a-uri-when-debugging-a-server-program is sufficient for this? Does anyone have a scenario that can't be covered with that feature?
vscodenpa commentedon Dec 23, 2022
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
adellhk commentedon Jan 12, 2023
roblourens in our usecase we are generating some code during the build step and we want to then bundle the generated code. It would be ideal to run the tasks that bundle the generated code as a postLaunchTask. For now we are just manually running the tasks after the build is done.
roblourens commentedon Jan 13, 2023
Not clear to me why that should be a postLaunchTask rather than part of the preLaunchTask
adellhk commentedon Jan 13, 2023
We're using VS Code and a well-supported VS-code extension to deploy code to Roku.

I want to bundle the files generated into out/.roku-deploy-staging after roku-deploy has created them with a hypothetical
postLaunchTaskafter the launch task that we invoked with F5 completes.hwmaier commentedon Jan 16, 2023
Yes, Refer to my comment above. With debuggers for embedded targets like the JLink Cortex ARM debugger you cannot use the
postLaunchtask because the debugger is not active yet. Certain things can only be done after the debugger has been started and at present those cannot be automated due to a missingpostLaunchTask.roblourens commentedon Jan 17, 2023
Adell (@adellhk) I still don't understand why it makes sense to bundle or deploy these files after debugging has already started.
Henrik Maier (@hwmaier) thanks for the explanation. As a workaround it would probably be easy for someone to write an extension that essentially implements a
postLaunchTask.cHemingway commentedon Jan 18, 2023
I also have the same scenario as Henrik Maier (@hwmaier) , also in embedded.
I quite often want to attach a program (e.g. a terminal, or J-Link RTT Viewer) to a running debugger, but (without modifying the program) it won't work unless the debugger process has been started.
For this use case, postLaunchTask would be very useful
roblourens commentedon Jan 20, 2023
Thanks. One reason I'm still hesitant to put this in vscode is that "postLaunch" is hard to define. There are multiple points in the debug setup flow that could be considered "postLaunch", and even then, there is no guarantee that the debuggee is in the right state that you need it in to be able to do what you want to do with it, and so I think a general "postLaunchTask" isn't the right direction.
Instead you might try to write an extension that can do what you want. For an example, you can see what we did for the
serverReadyActionfeature with this extension:vscode/extensions/debug-server-ready/src/extension.ts
Line 301 in 0e9e351
We were solving the same problem there - for example, just because the web server process has started and a debugger has attached, it doesn't mean that the server is ready to handle requests, so we need to watch for a custom output string to know when the web server is ready.