Giter Site home page Giter Site logo

pause-console's Introduction

Console Pauser - 控制台暂停脚本

介绍

Visual Studio 的 Windows 本地调试器在运行完控制台 C++ 程序后,可以“暂停”控制台的退出,以观察程序输出。Dev-C++ 和 Code::Blocks 也实现了类似的功能,基本原理是运行一个称为 ConsolePauserConsoleRunner 的程序;该程序以子进程方式启动目标程序,并在目标程序退出后暂停,等待用户输入后退出。

本项目的目标,是在 Visual Studio Code 中实现类似的功能。VSCodeConfigHelper v2/v3 使用本项目的脚本代码以实现外部弹窗运行功能;于 v4 直接以 VS Code 扩展形式引入。

Usage

In tasks.json:

{
  "type": "pause-console",
  "command": "<EXECUTABLE>",
  "args": [ "<ARGS>" ],
  "options": {
    "env": {},
    "cwd": "<CWD>"
  },
  "problemMatcher": []
}

pause-console's People

Contributors

guyutongxue avatar

Stargazers

 avatar

Watchers

 avatar

pause-console's Issues

PowerShell will provide extra args to program when there is no args

Fix:

if ($args.Count -ne 1) {
  $quotedArgs = ConvertTo-CommandLine $args[1..($args.Count - 1)]
  $startTime = $(Get-Date)
  $proc = Start-Process -FilePath $args[0] -ArgumentList $quotedArgs -NoNewWindow -PassThru
} else {
  $startTime = $(Get-Date)
  $proc = Start-Process -FilePath $args[0] -NoNewWindow -PassThru
}

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.