c++では、textファイルを用いたdebugはlaunch.jsonファイルの中身を以下のようにしたらできました。
{ // IntelliSense を使用して利用可能な属性を学べます。 // 既存の属性の説明をホバーして表示します。 // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/a.exe", "args":[ "<input.txt", ">output.txt", ], "stopAtEntry": true, "externalConsole": false, "cwd": "${workspaceFolder}", "environment": [], "MIMode": "gdb", "windows": { "miDebuggerPath": "C:\\MinGW\bin\gdb.exe" }, "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
Pythonでも同様にすれば同じことができると考えたのですが、txtファイルを無視して普通にターミナルの入力のみ受け付けるといった状態になってしまいました。
{ // IntelliSense を使用して利用可能な属性を学べます。 // 既存の属性の説明をホバーして表示します。 // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python debug", "type": "python", "request": "launch", "program": "${file}", "console": "internalConsole", "stopOnEntry": true, "args" : [ "<input.txt", ">output.txt", ] } ] }
どのような設定を書けばc++と同じことができるようになるのか、教えていただきたいです。
よろしくお願いいたします。
あなたの回答
tips
プレビュー