#VSCode Workspace Tutorial Feedback
1 messages ยท Page 1 of 1 (latest)
@cinder solstice Thanks!
@boreal loom I have installed VSCode. Looks promising ๐
@boreal loom I visited your website https://github.com/justarandomgeek/vscode-factoriomod-debug/blob/current/doc/workspace.md and installed the linked Factorio Modding Tool Kit as well as Zip File Explorer and indent-rainbow. I don't use GIT thus I skipped that. What about the Lua language server? Do I need to install that separately? Isnt it already part of the Factorio Modding Tool Kit? And which Factorio Mod Debugger do you mean?
@boreal loom I did not even know that you can also use unzipped mod folders in the mods directory. That saves some time for zipping new versions all the time ๐
I don't think you'll need to ping for every message.
VSCode Workpace Tutorial Feedback
Website says "Click the Factorio version selection in the status bar to get started!"
The list of versions is empty. I click on "Select other version...", navigate to "D:\SteamLibrary\steamapps\common\Factorio\bin\x64\factorio.exe" and double click it. Nothing happens.
The rainbow extension is quite cool by the way
especially in a thread where it does that by default anyway
does it now show a version in the status bar?
yes, you need to install the lua language server, as it says.
mod debugger is just hte old name for fmtk, i think i've already changed that mention for a future version
VSCode Workspace Tutorial Feedback
After double clicking the factorio.exe it looks like this. Then I press "Enter" as it says. But nothing happens. The status bar still says "Factorio (unselected)". Do I need a special debug exe version of factorio?
oh well, it's asking you for a name, did you give it name?
reading the prompts woudl help :p
(so that it knows what to call that version in the picker list)
Ok, I installed the lua language server. That was easy.
and if you've completed the version picker thing then now when you restart one more time the language server will offer to apply factorio settings to the workspace
๐ค hmm, i guess i can/should offer to reload the workspace when sumneko is already active when i push settings...
and i've added more placeholder label here for the next version to make it more obvious what it needs
"Enter a display name to be used in the Version Selector for this version"
Ok, I have now defined the name on my own. I called it "Factorio 1.1.74" (I thought that the addon automatically recognizes the version. The prompt says "Display name for this version" (Press 'Enter' to confirm...)" and YES I want to display the name and thus I pressed Enter. But ok. I typed it manually. It's fine.
oh yeah the name is more for stuff like "steam" "standalone install" "the one i test with" kind of labels
err, it's nto a yes/no question, it's "what is the name of this isntall"
I restarted VS Code. And now it shows:
yup, tha'ts this one
"Enter a name and press 'Enter'" would be clearer ๐
.
literally just said i added taht
Ok, I pressed "Apply and modify" (the blue one)
Ah, sorry. Overread this.
You are damn fast with answering.
Now everything looks good.
yeah that should be everything
To test now the power of the new environment I guess I could set a break point and start factorio. Let me try.
note taht the default only debugs control stage, you have to select one of the other debug configs for data
(right next to the launch button)
heh, that breakpoint wouldn't have worked at all until very recently too when i started moving breakpoints to the next valid location if they werent' on one :p
Ok. Then it makes sense that the loading screen was not interrupted.
since it appears to be on a blank line
But ok blank lines is nothing for a computer. Clear.
it'll move down tot he log and break on that instead
fine
because only locations that emit instructions really exist when it actually runs
(looking for a launch button somewhere ... dont find any...)
it breaking on the log line is technically after end and before log anyway since it when it breaks on a line it's paused right before executing said line (specifically the instruction(s) on that line)
For me it looks like this:
oh i guess it doens't give you the default ones until you tryto run the first time
been too long since i set it up
Thus I click on create a launch
yeah there you go
I guess I need
yup
you can customize those configs too later once you're more comfortable with vscode in general
but for now they should be fine as-is
no, you need the steam appid.txt
i guess your steam verson being in a werid place made it not able to do that automatically ๐ค
Ah here was some info of yours: https://github.com/justarandomgeek/vscode-factoriomod-debug/blob/current/doc/debugadapter.md
yeah, it must have failed to do that bit for you (or maybe you missed the prompt offering it? iirc it's right after teh version picker)
I missed nothing. I sent every single possible screenshot so that others can follow this guide here as well ๐
I will now create the app id file
Now Factorio starts ๐
๐
And it correctly breaks at breakpoint ๐
Just to chime in, I appreciate this thread! I was trying to set breakpoints in the data stage yesterday and it wasn't obvious at first to me (probably because I didn't slowly ready the options in launch.json) in how to reach the breakpoint. I'm glad it's being mentioned here ๐ thanks again for your work here justarandomgeek ๐
Only "downside" is that the startup is now incredibly slow with the debug launch. I guess I better deactivate all other mods during development. (This is only true for the debug for settings and data. Normal debug is fast)
yeah that's why it's not part of teh default config
but the whole point of a debugger is to slow down the program to the speed the programmer thinks at :p
I have setup the same now on another computer. There the auto detection of the factorio exe worked just fine ๐ I guess the problem on my main computer is that I have multiple steam directories on different drives. I guess you "only" look in one steam directory.
yeah i just have a hardcoded list of likely places to look
and show you any that i find from that list
is there a way i can programmatically ask steam where the library is?
(from a node.js program, if taht context affects the answer at all)