デフォルトシェルがBashじゃないとVisual Studio for Macでコンソールアプリをデバッグしようとするとエラーになる
環境情報
- macOS HighSierra
- Visual Studio for Mac 7.2
内容
タイトルの通り。 VS for Macで、C#で作成したコンソールアプリをデバッグしてみたところエラーになってしまった。
ter=vscode --connection=/var/folders/sp/mwvxp3qs2x590qp6vj7fjlcr0000gn/T/CoreFxPipe_vsdbg-ui-be8ed2c9c49644b4b22eb0e0ad822650; echo $? > /var/folders/sp/mwvxp3qs2x590qp6vj7fjlcr0000gn/T/tmp607f41ec.tmp; echo; read -p 'Press any key to continue...' -n1; exit fish: $? is not the exit status. In fish, please use $status. clear; cd "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/DotNetCore.Debugger/Adapter"; "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/DotNetCore.Debugger/Adapter/vsdbg" --interpreter=vscode --connection=/var/folders/sp/mwvxp3qs2x590qp6vj7fjlcr0000gn/T/CoreFxPipe_vsdbg-ui-be8ed2c9c49644b4b22eb0e0ad822650; echo $? > /var/folders/sp/mwvxp3qs2x590qp6vj7fjlcr0000gn/T/tmp607f41ec.tmp; echo; read -p 'Press any key to continue...' -n1; exit
原因
これもタイトルの通りで、デフォルトシェルがBashでなく、Fishを使っているから。
解決方法
Bashを使う。 、、、だとあんまりなので以下のように対応
- デフォルトシェルはBashに
- iTerm2の設定でFishを使うように設定
これだけでiTerm2実行時はFishが、デバッグ実行時にはBashが起動するようになる。 普段使っているのがITerm2なので自分的にはこれで解決。
一応、公式も対応するつもりのようですが、保留中になってますね。。。
いつになるのだろう。。。