Current working directory in debugger

Whats the best way to get the current working directory when debugging and running a cocoa console app from the command line ?

I used NSFileManager.defaultManager.currentDirectoryPath but that only works when I run the app from the command line.

Inside the debugger it returns ‘/’

Cheers,
John

http://man7.org/linux/man-pages/man2/getcwd.2.html looks promising.

That’s probably because Fire/our debugger doesn’t set the working directory, not because of anything you are doing wrong, i would guess. i’ll investigate.

Actually no, looks like we do set it correctly from Fire/Debugger, afaict.

Thanks, logged as bugs://75417

Fixed:

bugs://75417 got closed with status fixed.

Have I got to set it or will it default to the debug or release folders ?

It’ll be / unless you set it. exe dir != working dir. although i COULD see how an argument could be made to use the former as default, if there latter is not explicitly set…

Logged as bugs://i63392.

bugs://i63392 was closed as fixed.