Window Debug Procedure

I am just starting to actually build a Xojo app from scratch on a Windows machine and it’s doing something I didn’t expect.

When I run(debug) the app by clicking the green toolbar triangle, instead of just running in the folder with the project like Max OS does, it is creating a debug folder and running there.

The problem is if the SQLite db file doesn’t exist, I create it in the current folder, so of course it is creating it in the debug folder and then it goes away when I quit the test run. Is there an option to not use the separate debug folder?

I’m on Windows 7 and Xojo 2017r1.1

Do something like this:

[code]#IF debugbuild then
dbpath = “c:\mylocation”
#else
dbpath = “”
#end if

f = getfolderitem(dbpath + “myfile.db”)
[/code]

Use the SpecialFolder.ApplicationData directory to store runtime data instead of the app’s parent directory.

Better yet, use TPSF to get the best AppData location on all three Desktop platforms:
https://github.com/devtimi/TPSF

[quote=334542:@william plunkett]I am just starting to actually build a Xojo app from scratch on a Windows machine and it’s doing something I didn’t expect.

When I run(debug) the app by clicking the green toolbar triangle, instead of just running in the folder with the project like Max OS does, it is creating a debug folder and running there.

The problem is if the SQLite db file doesn’t exist, I create it in the current folder, so of course it is creating it in the debug folder and then it goes away when I quit the test run. Is there an option to not use the separate debug folder?

I’m on Windows 7 and Xojo 2017r1.1[/quote]

This is 100% expected because Windows apps ALWAY generate two additional folders for libs & resources
In order to NOT overwrite existing things the app is built into a directory

Use a copy file step to copy the database next to the app

ok, thanks guys,

Just another reason I still like OS X better…

Well, to be fair, you were doing it wrong on OSX too. Had your app been translocated on Sierra you’d have the same problem.