Closed Rytikar closed 1 year ago
Could you please turn on verbose outputs to get more debugging information in the VS64 settings?
Just one quick question: you selected the "Vice" launch configuration - and not the 6502 emulator? That would be the simplest explanation... (just had to ask as not everyone is super familiar with vscode).
Yes, I selected "launch vice", I have three configurations in the file. I enabled trace logging but could not find the log file. Where is it written to? On another note, I'm working in parallel on a desktop and laptop machine, both on Ubuntu 22.10. The laptop starts vice fine when debugging. The problem is the main machine.
Unfortunately, you have to open the "Developer Tools" window to see the console ouput - will be improved/fixed in future releases, but should be fine. To do so, open the command palette (Ctrl+Shift+P) and select "Developer: Toggle Developer Tools". This will open up the usual Chrome browser developer window which shows Console outputs.
Both environments do have the most recent version of vice installed?
No problem, I got the log. Vice is 3.6.1 on both machines. The problem machine builds successfull and then...
[Extension Host] 25730.555 debug_session.js:342 T/DebugSession.DebugSession.launchRequest: launchRequest
console.ts:137 [Extension Host]
console.ts:137 [Extension Host] 25731.172 debug_session.js:115 D/DebugSession.Socket.
Hi. I am preparing a more verbose temporary version of the extension, maybe you could try it out when it's ready. One more question regarding the setup: you're running only one instance of vice (that means, no other version is running when the debugger starts?). Vice settings are setup identical on the two machines? Clash could be that something is blocking the BinaryMonitor port (either another instance of vice or something else...). Does it work, when you manually start vice with the options "-binarymonitor" and "-autostartprgmode 1" and then use the "attach vice" launch configuration?
It would be great if you could download and manually install v2.1.5 which adds a lot more tracing info. https://github.com/rolandshacks/vs64/releases/download/v2.1.5/vs64-2.1.5.vsix (Go to the extension browser and install the downloaded .vsix file) THANKS!!
I did install 2.1.5, thanks for the effort.
About similar setup. As far as I know it's similar. Same Ubuntu version, vice installed via apt. But obviously something must be different.
And about the tooling :-) It's a long shot and no hurry, but the extended plan is to make a version for the 'Commander X16'. https://www.commanderx16.com/ Would be nice to support the emulator at a point in the future. :-)
Else the extensions works great. It is such a relief to use modern tools developing C64 software instead of doing it all ON the C64. First time I started debugging directly on vice I nearly shed a tear... :-) And all the supporting tools are made in C#.
Log now shows...
[Extension Host] 24.448 extension.js:495 T/Extension.Extension.showStatus: status: $(pass) Build succeeded console.ts:137 [Extension Host] 24.497 debug_session.js:98 D/DebugSession.DebugSession.start: start debug session console.ts:137 [Extension Host] 24.520 debug_session.js:342 T/DebugSession.DebugSession.launchRequest: launchRequest console.ts:137 [Extension Host] 24.521 connector.js:1061 D/ViceConnector.ViceProcess.spawn: launch emulator: x64sc -binarymonitor -autostartprgmode 1 console.ts:137 [Extension Host] 24.531 connector.js:295 T/ViceConnector.Socket.connectErrorEventListener: peer not ready when trying to connect: Error: connect ECONNREFUSED 127.0.0.1:6502 console.ts:137 [Extension Host] 24.594 connector.js:1042 D/ViceConnector.ViceProcess.stderr: x64sc: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE console.ts:137 [Extension Host] 24.781 connector.js:295 T/ViceConnector.Socket.connectErrorEventListener: peer not ready when trying to connect: Error: connect ECONNREFUSED 127.0.0.1:6502
goes on with the same output, and then...
[Extension Host] 29.539 debug_session.js:283 E/DebugSession.DebugSession.createEmulatorInstance: debug error: failed to connect to emulator process
Could it be that the port 6502 is used by another instance?
Or, maybe you could check the vice settings for the "binary monitor". Look if the port is indeed 6502.
Btw. you don't need the "Chrome Developer Tools" anymore - just use the Output / VS64 panel at the bottom of vscode window.
The setting is on 6502 (I see what you did there, vice...) The monitor settings are the same on the working and not working machine. The port is not in use, as far a I can see (sudo lsof -i -P -n | grep LISTEN)
What is this in the logs... undefined symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
hmm, pthreads lib ... does it even start if you directly do "x64sc -binarymonitor -autostartprgmode 1" on the terminal?
Maybe there is an issue with vscode... found this: https://github.com/microsoft/vscode/issues/179274
They basically say that one potential problem is when installing vscode on Ubuntu using that damn Snap environment... maybe that's the reason I could not reproduce so far - I added the apt sources for installation.
(If you want to give it a try, please look at: https://code.visualstudio.com/docs/setup/linux)
Yes, issue is with recent ubuntu update and vs code snap. I uninstalled the snap, downloaded the .deb and reinstalled it. Works... Noice!
Thanks
Glad we found it. Thanks for giving all the feedback and assistance!
Hi, title says it all. launch.config has the three settings, but nothing happens. vice is installed and I can launch it manually, though. This is on Ubuntu 22.10.
Regards