rolandshacks / vs64

C64 Development Environment for Visual Studio Code
Other
88 stars 15 forks source link

Question: the QA page led me here so guessing this is the correct place for questions? #60

Open wjkoontz opened 3 months ago

wjkoontz commented 3 months ago

How do you turn off the remote debugger entirely for vice? I have been trying to get the remote debugger working on my mac but although it connects on port 6502 the UI never shows me any details. Works fine with the built-in 6502 but never with vice. Fine I'd like to at least be able to open vice's internal monitor but can't because whenever I do vice freezes because it was run with remote monitor.

/Applications/vice-x86-64-gtk3-3.8/VICE.app/Contents/Resources/bin/x64sc +remotemonitor -binarymonitor -binarymonitoraddress ip4://127.0.0.1:6502 -autostartprgmode 1

It seems easy to ADD arguments to the command line, but it still just adds them to the default ones. /Applications/vice-x86-64-gtk3-3.8/VICE.app/Contents/Resources/bin/x64sc +remotemonitor -binarymonitor -binarymonitoraddress ip4://127.0.0.1:6502 -autostartprgmode 1 -remotemonitor +binarymonitor

How do I get it to just not try to do remote debugging?

rolandshacks commented 3 months ago

Currently, this option does not exist - but could be added in future versions.

But let's find out why the binary monitor doesn't work, maybe that's the better fix.

Here's one working configuration that I use for testing:

grafik

wjkoontz commented 3 months ago

Wow thatks for the quick reply! The monitor works now that I know what I'm doing. I actually had it setup correctly but was expecting it to behave differently. My program was exiting immediately and of course the debugger wasn't really running or whatever, stopping the program with a break point got it in the mode where I saw the expected behaviour. The built-in showed processor status and things even when nothing was running but again its totally different so kinda makes sense now. So it was working all along I just wasn't using in correctly! My ignorance of both VS code and the extension I think.

Thanks again for the quick reply!

wjkoontz commented 3 months ago

Even better now that I've figured out how to make the the debugger connect and work I can "fix" the broken internal monitor issue.

Not sure if this is a bug or not so will try to describe. I have a "launch" and an "attach" , if I "attach" first it has nothing to attach to so fails. I "launch" but don't "attach" and try to use the monitor from the Vice menu (internal monitor) and vice hangs.
Whether or not I try to use the internal monitor I can now "attach" to the running vice. If its hung I can reset it from the extension, put in break points all the things work.. but internal monitor will hang. If I now 'disconnect' from the running session in the debugger controls in VS code, I CAN USE the internal monitor again! So it only hangs if I try it before "attaching" and "detaching".

rolandshacks commented 2 months ago

Hi. What you describe is how it is designed to be - or, ..., how VICE let's you remote control from outside. Best way to understand is that whenever either vs64 OR the internal monitor interacts with the emulator, they always do it exclusively. No way to combine the two things. So, if you need/want to use the internal monitor, you basically need to keep vs64 detached from VICE to enable the internal monitor.

vs64 "LAUNCH" always does two things: launch the VICE process, then attach (connect to the binary monitor port), then does all the session/control handling. Stopping/ending the debug session (intentionally) keeps the VICE process running, but disconnects -- which for VICE means, there's nothing else going on from outside.

vs64 "ATTACH" works with an already started VICE process, just tries to connect to the binary monitor.

So, combining vs64 debugging with the VICE monitor indeed requires you to know these things and manually connect/disconnect. Ideally, vs64 evolves to a complete replacement of the VICE internal monitor (well, partially, it already is ... just give it a try!)

Cheers! Roland