slembcke / debugger.lua

A dependency free, embeddable debugger for Lua in a single file (.lua or .h)
MIT License
781 stars 95 forks source link

does not work on windows - getenv invalid #58

Closed Triangle345 closed 5 years ago

Triangle345 commented 5 years ago

does not work on windows because of

local cwd = '^' .. os.getenv('PWD') .. '/'

"unable to concatenate nil value"

slembcke commented 5 years ago

I might just axe the code that shortens paths. PWD and HOME are common but not recommended on UNIXes too.

slembcke commented 5 years ago

Hmm. I think I've decided to push this functionality to a callback. Shortening the current and home directory paths are somewhat project specific. With a couple lines of gsub()s, a project could apply it's own filtering to be even more effective.

slembcke commented 5 years ago

The os.getenv() code is removed on the develop branch. I haven't implemented a path callback yet though. Help testing would be appreciated.

rabbitisle commented 5 years ago

I'd like to help testing this. Please let me know how.

slembcke commented 5 years ago

Try the version in the develop branch

rabbitisle commented 5 years ago

Tested the develop branch version and this bug is fixed. The debugger starts correctly. Thanks for your work.

slembcke commented 5 years ago

I merged these changes into master.