Show Debug Console Every Time Running Simulator

Hi everyone,

I'm on windows using vscode. Is there anyway to make sure the debug console launches every time you load the simulator? Seems like sometimes it does but most of the time I have to open it manually. Am I missing something?

I'm using Simulator Version 1.13.4.

The debug console should remember its state across launches. E.G. if it was open last time you quit, it will reopen the next time. If it was closed on quit, it will stay closed on relaunch.

Strange when I rebuild while the simulator is open in vs code it doesn't relaunch it with the console open. But if I close the simulator before I rebuild it, it will keep the console open.

That is interesting, I'll take a look and see if there is something on our end that is triggering this.

I tried to reproduce this with no luck. What SDK are you using? How are you launching the Simulator? Are you using VSCode configuration templates?

Sorry to necro an old thread, but I am having this issue. I'm using Whitebrim's VSCode-Playdatetemplate.

If I close the sim it launches with the console, but if "Build and Run (Simulator).ps1" closes the sim it launches with no console.

Any recommendations on a "friendlier" way to close the simulator?

or alternately, command line options to open stuff automatically? -console, -malloc, etc. ?

What OS are you running on?

Using Windows 10 & 11

Without looking at the script, my only thought is it may be killing the Sim so it isn't writing out the prefs correctly and losing state.

If anyone finds this in the future:

I changed this line in Build and Run (Simulator).ps1

$sim.CloseMainWindow()

to

Stop-Process -InputObject $sim

and it seems to fix the issue for me. I'll see if I can submit this to the original github.

I wonder what CloseMainWindow() is doing. If the Console window is in the foreground it may consider that the main window and close it right before the sim is quit which is causing the preference to be set to closed on next launch. Your fix to stop the process seems, perhaps, better.