Vscode: UI support for TimeTravel Debugging

Created on 14 Jun 2016  路  21Comments  路  Source: microsoft/vscode

Most helpful comment

@roblourens @isidorn works great, thanks!

@aruneshchandra the TimeTravel UI is available in the next VS Code Insider build.

All 21 comments

@roblourens I like how you implemented this in the prototpye. Would you like to create a PR with your changes + plus a small adition that you only instantitate that aciton if stepBack is supported

And the label needs to be nls.localized.
And it also needs to be registered as a global workbench action.

Sure, I can do that

@roblourens I've added the 'step back' request and the capability to the debug protocol. It is already available in the latest VS Code.
The mock-debug extension (available on the marketplace) implements step back and can be used to verify the UI.

plus a small adition that you only instantitate that aciton if stepBack is supported
@isidorn you're talking about DebugActionsWidget.getActions? I could instantiate it the first time a session starts that supports stepBack, and on subsequent calls, either include it or not in the array that's returned? Or, it is possible to just hide a debug action with a css class if it's not supported?

The actions get instantiated every time the widget gets created, so just instantiate it or not every time based on the capability.
No need to hide imho

If I understand correctly, it looks like the widget is created once for the lifetime of the Code instance, and the actions are created once and cached and reused for every debug session.

@roblourens @isidorn works great, thanks!

@aruneshchandra the TimeTravel UI is available in the next VS Code Insider build.

@weinand @isidorn @roblourens Thanx for a quick turnaround on this feature request!

@aruneshchandra welcome. Is the chakra debug adapter extension published - I could not find it? Is there some way we can try this out - since we woudl ike to add it to our test plan.

@agarwal-sandeep can tell you more about this.

cc:@curtisman

@isidorn Node-ChakraCore is supposed to work with vscode-node-debug adapter as Node-ChakraCore will support the debugging protocol without extensibility.

@roblourens had added a 'back' stepaction to 'continue' command in the vscode-node-debug adapter prototype. https://github.com/roblourens/vscode-node-debug/commit/fdc0ea24d08b5e0213642d048791ce2fd920216d that change needs to be in adapter if UI says stepback.

@agarwal-sandeep are you saying that the current VSCode implementation for stepBack functionality is not complete ?

node.exe (Chakracore) needs to know that step back is requested and it is not in debugging protocol so adapter needs to send a different action in continue command and I don't see it in https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/nodeDebug.ts

@roblourens @weinand how will adapter notify the process?

@agarwal-sandeep we have implemented the UI as requested in https://github.com/Microsoft/vscode-node-debug/issues/72. Currently the UI can be controlled by a capability returned from the debug adapter. Our assumption was that Chakra would have its own debug adapter and that would enable the capability and implement a 'step back' request. https://github.com/Microsoft/vscode-node-debug/issues/72 did not mention that we have to implement the 'step back' request in vscode-node-debug.

Please create another feature request for vscode-node-debug so that we can enable the capability and implement the 'step back'. For the latter we need to know what the value for the stepactionof the continue request is.

I see one problem with this feature request: the debug-adapter has to return the 'step-back' capability from the 'initialise' request. But there we do not know whether the used node version supports 'step back' or not. This information is only available when the runtime is launched. But this is too late for returning the capabilities. We can address this sequence problem is the future, but for this release we have to find another way to determine early that chakra is used and supports 'step back'.

Thanks @Weinand, I have open issue https://github.com/Microsoft/vscode-node-debug/issues/77.

For capability detection is it feasible to use some environment variable?

@agarwal-sandeep sure, node-debug could use an environment variable as an indicator that node.js is actually chakra.

Please suggest how the env var should be named.

Please note that this env var cannot be set in the launch config but must be set globally.
Let me know if this would work for you (until we've fixed the real issue).

@aruneshchandra @mrkmarron for their feedback. We can use NODE_DEBUG_SUPPORTS_STEPBACK=1

@agarwal-sandeep how is this supposed to get set ? Is the user is expected to set this ?

@agarwal-sandeep yes, the user would have to do this (which would be a pain). We are currently looking into how to fix this issue.

@agarwal-sandeep we are planning to enhance VS Code so that the supportsStepBack capability can be returned from the launch and attach requests.

@weinand yes that's much better than expecting users to set the env variable. Thanx!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirius1024 picture sirius1024  路  3Comments

vsccarl picture vsccarl  路  3Comments

villiv picture villiv  路  3Comments

biij5698 picture biij5698  路  3Comments

curtw picture curtw  路  3Comments