Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

title How to Debug Bash with VSCode
permalink /bash/

How to Debug Bash with VSCode

Summary

Basic

Spec

  • OS
    • ✅ MacOS
    • Windows
    • ✅ Linux
  • Break Point
    • ✅ break point
    • ❌ condition break point : able to set, but not working
    • ❌ function breakpoint
  • Step Execution
    • ✅ Step Over
    • ✅ Step Into
    • ✅ Step Out
    • ✅ Continue
    • ❌ Step Back
    • ❌ Move To
    • ❌ Pause
  • Variables
    • ✅ variables views
    • ✅ watch variables
  • Call Stack
    • ✅ call stack
  • Evaluation
    • ✅ eval expression to show variables
    • ✅ eval expression to change variables
  • Type of Execution
    • ✅ debug executable package
    • ❌ remote debugging

Instraction

  1. Install bashdb
    • MacOS: brew install bashdb
    • Ubuntu: apt install bashdb

debugging executable file

launch.json

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Bash-Debug (hardcoded script name)",
			"type": "bashdb",
			"request": "launch",
			"scriptPath": "${workspaceRoot}/bubbleSort.sh",
			"commandLineArguments": "4 3 2 1",
			"windows": {
				"bashPath": "C:\\Windows\\sysnative\\bash.exe"
			},
			"linux": {
				"bashPath": "bash"
			},
			"osx": {
				"bashPath": "bash"
			}
		}
	]
}