Code Monkey home page Code Monkey logo

vscode-bash-debug's Introduction

VS Code Bash Debug

A bash debugger GUI frontend based on awesome bashdb scripts (bashdb now included in package).

Overview

This is a SIMPLE bashdb debugger frontend. Useful for learning bash shell usage and writing simple scripts.

Useful hint: shellcheck extension does a great job with finding common script errors before debugging.

Usage

  1. Select Debug -> Add Configuration to add custom debug configuration (drop-down, path-input, etc...)
  2. Select Debug -> Start Debugging (F5) to start debugging

See https://code.visualstudio.com/docs/editor/debugging for general usage.

Sample features

  • Debugging auto-configuration via launch.json

  • Simple debugging in hello world application

  • Standard input handling via terminal

  • Pause support while script is running

  • Advanced "Watch" and "Debug console" usage

  • Conditional breakpoints usage

For Windows users:

  • Install Windows Subsystem for Linux
  • Terminal has problems with spaces in paths when powershell is used, use WSL bash instead. For beta WSL please read this
  • pathBash refers to BASH binary path in WSL filesystem, not path to wsl.exe/bash.exe

For macOS users:

  • Read here if your mac has /usr/local/bin/pkill.
  • Install bash version 4.* and set pathBash properly

Dependencies

  1. bash version 4.0 or later
  2. cat, mkfifo, rm, pkill

Limitations and known problems

  • Use terminalKind@launch.json set to integrated or external for interactive scripts (using stdin)
  • Currently debugger stops at first command
  • $0 variable shows path to bashdb
  • Older bash versions ( 4.0 - 4.2 ) are not tested, but might work™
  • BASH_REMATCH gets overwritten when stepping through code

vscode-bash-debug's People

Contributors

adolfojunior avatar antonio-petricca avatar felipecrs avatar puremourning avatar rogalmic avatar wataash avatar xhiroga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.