TOPLLab / WARDuino-VSCode

🕵️ A VSCode debugger plugin for WARDuino.
Mozilla Public License 2.0
2 stars 2 forks source link

`Pull debugsession` command does nothing when timeline not loaded #108

Open tolauwae opened 1 year ago

tolauwae commented 1 year ago

When the debug timeline view is not loaded in VS Code (it is collapsed for instance), the pull debugsession just does nothing. No error or message.

That is because of this if statement:

https://github.com/TOPLLab/WARDuino-VSCode/blob/be8fe97a6f112a9b69be998f4662b87c1bece33a/src/DebugSession/DebugSession.ts#L398-L400

The command should still work even if the view is hidden. Maybe the command can "launch" the view and make it visible or something similar.

chscholl commented 1 year ago

That's pretty bad, we should never depend on the GUI components to keep track of the time. We should have a model time which we update when the GUI changes and here we should just access the current value from our model.

tolauwae commented 1 year ago

@carllocos is it just a case of removing an if? Or is this more deeply embedded in the new software structure?

carllocos commented 1 year ago

@chscholl agree. That should indeed never depend on the GUI. I'm surprised that somehow it is the case. I made the debuggerBridge intentionally an event emitter to remove the dependency from the GUI.

@carllocos is it just a case of removing an if? Or is this more deeply embedded in the new software structure?

I do not remember exactly. I'll have to look into the code. I will fix the issue now worries.