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
{{ message }}
Repository navigation
preLaunchTask does not fire on restart when adapter supportsRestartRequest #28979
bugIssue identified by VS Code Team member as probable bugdebtCode quality issuesdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
Works for me, restart will always trigger preLaunchTask.
If you would like us to investigate further please provide a github repository for which you can easily reporduce this. Though I believe this is not a vscode issue since I see other users asking the opposite #17439
When a debug adapter is using this capability it is fully in charge what the restart exeprience should be like. So vscode does not do anything (including restarting the task). We currently do not support a half baked approach, where chrome would do some things in the restart and vscode the rest. Leaving this open as a feature request
changed the title [-]preLaunchTask does not fire on restart[/-][+]preLaunchTask does not fire on restart when adapter supportsRestartRequest[/+]on Jun 20, 2017
I think it should act the same as when running without supportsRestartRequest. If your task just does a build, then it would be really useful to have it run the build then refresh the browser. If it's a background task, then it should just refresh the browser.
I thought maybe there was another issue for this where we discussed it, but I can't find it. I don't think it would be possible for the debug extension to implement this.
roblourens yes I agree what would be the ideal solution, however as mentioned above due to the current implentation we are not doing that yet (running a prelaucnh task and starting a new debug session are coupled).
Leaving this in the backlog until more users complain
bugIssue identified by VS Code Team member as probable bugdebtCode quality issuesdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
Activity
isidorn commentedon Jun 19, 2017
Works for me, restart will always trigger
preLaunchTask.If you would like us to investigate further please provide a github repository for which you can easily reporduce this. Though I believe this is not a vscode issue since I see other users asking the opposite #17439
justin-romano commentedon Jun 19, 2017
Sorry i need to further qualify this issue. This is using the chrome debugger.
isidorn commentedon Jun 20, 2017
That is because the chrome debuggers is using a custom restart feature.
When a debug adapter is using this capability it is fully in charge what the restart exeprience should be like. So vscode does not do anything (including restarting the task). We currently do not support a half baked approach, where chrome would do some things in the restart and vscode the rest. Leaving this open as a feature request
Ping roblourens to also get his opinion
[-]preLaunchTask does not fire on restart[/-][+]preLaunchTask does not fire on restart when adapter supportsRestartRequest[/+]roblourens commentedon Jul 4, 2017
I think it should act the same as when running without
supportsRestartRequest. If your task just does a build, then it would be really useful to have it run the build then refresh the browser. If it's a background task, then it should just refresh the browser.roblourens commentedon Jul 4, 2017
I thought maybe there was another issue for this where we discussed it, but I can't find it. I don't think it would be possible for the debug extension to implement this.
isidorn commentedon Jul 17, 2017
roblourens yes I agree what would be the ideal solution, however as mentioned above due to the current implentation we are not doing that yet (running a prelaucnh task and starting a new debug session are coupled).
Leaving this in the backlog until more users complain
8 remaining items
isidorn commentedon Jun 12, 2018
Andre Weinand (@weinand) good point, I have tackled this via 27d0fc2
chrmarti commentedon Jun 28, 2018
I still see the
preLaunchTaskonly run once with the Chrome debug adapter. What is the expected behavior?isidorn commentedon Jun 28, 2018
That every time you restart the preLauncTask fires, if that is not the case please reopen and assign to July
chrmarti commentedon Jun 28, 2018
It works with the Node adapter, but not with the Chrome adapter. My launches:
{ "type": "node", "request": "launch", "name": "runawhile.js", "program": "${workspaceFolder}/runawhile.js", "preLaunchTask": "npm: hello1", "postDebugTask": "npm: hello2", }, { "type": "chrome", "request": "launch", "name": "Chrome server.js", "url": "http://localhost:3000", "webRoot": "${workspaceFolder}/wwwroot", "preLaunchTask": "npm: hello1", "postDebugTask": "npm: hello2", },isidorn commentedon Aug 2, 2018
Christof Marti (@chrmarti) good catch