#VSCode Workspace Tutorial Feedback

1 messages ยท Page 1 of 1 (latest)

cinder solstice
#

Thread started on request.

waxen gust
#

@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?

GitHub

Factorio Mod Tool Kit. Contribute to justarandomgeek/vscode-factoriomod-debug development by creating an account on GitHub.

#

@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 ๐Ÿ™‚

cinder solstice
#

I don't think you'll need to ping for every message.

#

VSCode Workpace Tutorial Feedback

waxen gust
#

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

boreal loom
boreal loom
boreal loom
#

mod debugger is just hte old name for fmtk, i think i've already changed that mention for a future version

cinder solstice
#

VSCode Workspace Tutorial Feedback

waxen gust
boreal loom
#

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)

waxen gust
boreal loom
#

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...

boreal loom
#

"Enter a display name to be used in the Version Selector for this version"

waxen gust
# boreal loom oh well, it's asking you for a name, did you give it name?

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.

boreal loom
#

oh yeah the name is more for stuff like "steam" "standalone install" "the one i test with" kind of labels

boreal loom
waxen gust
#

I restarted VS Code. And now it shows:

waxen gust
boreal loom
#

literally just said i added taht

waxen gust
#

Ok, I pressed "Apply and modify" (the blue one)

waxen gust
#

You are damn fast with answering.

#

Now everything looks good.

boreal loom
#

yeah that should be everything

waxen gust
#

To test now the power of the new environment I guess I could set a break point and start factorio. Let me try.

boreal loom
#

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

waxen gust
#

Ok. Then it makes sense that the loading screen was not interrupted.

boreal loom
#

since it appears to be on a blank line

waxen gust
#

It is. There I want to break.

#

After end. Before log.

boreal loom
#

you can't break on an empty line

#

there's no code there to break on

waxen gust
#

But ok blank lines is nothing for a computer. Clear.

boreal loom
#

it'll move down tot he log and break on that instead

waxen gust
#

fine

boreal loom
#

because only locations that emit instructions really exist when it actually runs

waxen gust
#

(looking for a launch button somewhere ... dont find any...)

boreal loom
rocky rapids
#

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)

waxen gust
boreal loom
#

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

waxen gust
#

Thus I click on create a launch

boreal loom
#

yeah there you go

waxen gust
#

I guess I need

boreal loom
#

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

waxen gust
#

Thus I need a debugadapter mod

boreal loom
#

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 ๐Ÿค”

waxen gust
boreal loom
#

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)

waxen gust
#

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 ๐Ÿ™‚

boreal loom
#

๐ŸŽ‰

waxen gust
#

And it correctly breaks at breakpoint ๐Ÿ™‚

iron stone
#

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 ๐ŸŽ‰

waxen gust
#

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)

boreal loom
#

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

waxen gust
#

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.

boreal loom
#

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)

waxen gust
#

But this is for C#

boreal loom
#

that seems to be for the game to do too, not some other random app on the computer

#

anyway i'll put it on the list to reserach if nobody shows up with a "yeah just do x" answer :p