Open henrik-jensen opened 5 years ago
For now this is not supported, but i will add it to potential TODO list.
The problem here might be another filesystem path mapping ( WSL c:\
=> /mnt/c/
, MSYS2 c:\
=> /c/
).
I assume msys2 console cannot handle native windows path, right?
I assume msys2 console cannot handle native windows path, right?
Well, only when enclosed in double quotes '"'.
# The three paths are all equivalent
henrik@superputte MINGW64 ~
$ ls "c:\this\path does\exist" \
> c:/this/path\ does/exist \
> /c/this/path\ does/exist
'/c/this/path does/exist':
'some file.txt'
'c:/this/path does/exist':
'some file.txt'
'c:\this\path does\exist':
'some file.txt'
I don't know how fragile this (heuristic?) system is but I always use the unix style /c/this/path\ does/exist
to be sure.
Looking forward to this feature! Also the bash in git for windows please, which is identical to the msys2 bash.
I took a look at this, it will not be that easy, for example:
I will check this fully once I have more time.
I have narrowed it down to this problem:
mkfifo /tmp/testpipe ; exec 3<>/tmp/testpipe ; cat <&3
echo "test" >/tmp/testpipe ; echo "test2" >/tmp/testpipe ;
This works ok when i run two WSL consoles (or in Linux), and seems to be a reason why i cannot get this working.
Any help with solving this would be appreciated, since this is the way how bashdb sends/receives debuuger input/output (stdin and stdout are used for debugged script)...
I have narrowed it down to this problem:
- open 2 console instances of Git Bash consoles
- start this in first one: ...
Thank you very much for your efforts!
@rogalmic - Also big thanks from me. Git bash is derived from msys(2?) which is derived from cygwin. iirc Cygwin should be much closer to POSIX compliance so it may work under cygwin? Could one imagine some thin cygwin layer or shim to emulate the linux pipes? Though of course you wouldn't really be debugging msys/git bash but cygwin in some cases. -> Works in the debugger but not in production, hmm?
I tested cygwin, git-bash, mingw - they all seem to have problems with fifo support.
Like you commented, this is probably because how those windows solutions are designed:
cygwin
rogalmic@WW302902 /usr/bin
$ /usr/bin/mount
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
mingw
rogalmic@WW302902 MINGW64 /bin
$ mount
C:/Program Files/Git on / type ntfs (binary,noacl,auto)
C:/Program Files/Git/usr/bin on /bin type ntfs (binary,noacl,auto)
C:/Users/rogalmic/AppData/Local/Temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
Underlying bashdb
outputs debug io to some kid of file - hence the fifo usage.
Maybe the best way would be to make fifo work in cygwin/mingw would be to have /tmp
mounted as tmpfs
? I guess this is not supported, possibly by design...
Hi,
Pycharm has a plugin Bashsupport-pro which works fine with wsl, msys2, linux, macosx.
Pycharm use bashdb too just like vscode-bash-debug So it is feasable to work with msys2.
keep the faith ;)
Regards
echo "test" >/tmp/testpipe ; echo "test2" >/tmp/testpipe ;
This working now with bash GNU bash, version 5.2.15(1)-release (x86_64-pc-msys) and MSYS_NT-10.0-19045 version 3.4.6.x86_64 (runneradmin@fv-az411-253) (gcc version 11.3.0 (GCC) ) 2023-04-01 11:43 UTC
I have narrowed it down to this problem:
- open 2 console instances of Git Bash
- start this in first one:
mkfifo /tmp/testpipe ; exec 3<>/tmp/testpipe ; cat <&3
- start this in second:
echo "test" >/tmp/testpipe ; echo "test2" >/tmp/testpipe ;
This works ok when i run two WSL consoles (or in Linux), and seems to be a reason why i cannot get this working.
Any help with solving this would be appreciated, since this is the way how bashdb sends/receives debuuger input/output (stdin and stdout are used for debugged script)...
Now it works :) !
@endmarsfr Thanks. 👍 I must try it out. But my vscode installation, (actually my whole system) is in a bit of a mess right now, so my feedback on this have to wait a few days.
@endmarsfr Thanks. 👍 I must try it out. But my vscode installation, (actually my whole system) is in a bit of a mess right now, so my feedback on this have to wait a few days.
@henrik-jensen, I hope you could give us your feedback soon Best regards
I'm also waiting for a msys2 fix 👍
@endmarsfr Thanks. 👍 I must try it out. But my vscode installation, (actually my whole system) is in a bit of a mess right now, so my feedback on this have to wait a few days.
@henrik-jensen, I hope you could give us your feedback soon Best regards
@endmarsfr I'm so sorry for the promises I gave. A few days have turned into several month (over 8 month actually) and I haven't really tried to fix my system. Too afraid it might break something. I really wish I weren't so laissez-faire with my system setup in the past. I will slowly try to get back into bash/vscode extension mode of thinking and, at some point in time, hopefully sooner than later, maybe give you some kind of valuable feedback.
Hi @henrik-jensen Thank you for this information, I hope your business will get better soon and always hope for good news from you.
Executables
Version of bash-debug: 0.3.3
Debug output
Details
Is it possible to use msys2 bash as an alternative to wsl.exe? wsl (ubuntu 18.04) works fine but I would like to debug some scripts under msys2.