Run tool version windows

Run tool window

The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied.

If you re-run an application, the new output overwrites the contents of the tab. To preserve the output of an application, even if you re-run it, pin the output tab.

If your application is running in the development mode on localhost , you can start debugging it right from the Run tool window. Just hold Ctrl+Shift and click the URL at which the application is running.

The appearance of each tab depends on the type of the application being run and can include additional toolboxes and panes.

The main toolbar of the Run tool window lets you rerun, stop, pause, or terminate an application. The following table contains descriptions of the buttons that are common for most applications.

Run Toolbar

Click this button to terminate the current process externally by means of the standard shutdown script.

Clicking the button once invokes soft kill allowing the application to catch the SIGINT event and perform graceful termination (on Windows, the Ctrl+C event is emulated). After the button is clicked once, it is replaced with indicating that subsequent click will lead to force termination of the application, for example on Unix SIGKILL is sent.

Item Tooltip and shortcut Description
Rerun
Ctrl+F5
Click this button to stop the current application and run it again.
When an application is stopped , this button toggles to .
Rerun
Ctrl+F5
Click this button to rerun the current application.
This button appears, when an application is stopped . When an application is running, this button toggles to .
Stop
Ctrl+F2
Restore Layout Click this button to have the changes to the current layout abandoned and return to the default state.
Pin Tab Click this button to pin or unpin the current tab. You may need to pin a tab to prevent it from closing automatically when the maximum number of tabs is reached in this window.
Close
Ctrl+Shift+F4
Click this button to close the selected tab of the Run tool window and terminate the current process.

Context Menu Commands

Item Description
Compare with Clipboard Opens the Clipboard vs Editor dialog that allows you to view the differences between the selection from the editor and the current clipboard content. This dialog is a regular comparing tool that enables you to copy the line at caret to the clipboard, find text, navigate between differences and manage white spaces.
Copy URL Choose this command to copy the current URL to the system clipboard. This command only shows on a URL, if it is included in an application’s output.
Create Gist Choose this command to open the Create Gist dialog.
Clear All Clears the output window.

Console Toolbar

Item Tooltip and shortcut Description
Up/down the Stack Trace
Ctrl+Alt+Up Ctrl+Alt+Down )
Click this button to navigate up or down in the stack trace and have the cursor jump to the corresponding location in the source code.
Use Soft Wraps Click this button to toggle the soft wrap mode of the output.
Scroll to the end Click this button to navigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
Print Click this button to send the console text to the default printer.
Clear All Click this button to remove all text from the console. This function is also available from the context menu of the console.

Karma Server tab

The tab is shown only when you run JavaScript unit tests using the Karma test runner. Use the tab to view and analyze information from the server.

Run tool window

The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied.

If you re-run an application, the new output overwrites the contents of the tab. To preserve the output of an application, even if you re-run it, pin the output tab.

The appearance of each tab depends on the type of the application being run and can include additional toolboxes and panes.

The main toolbar of the Run tool window lets you rerun, stop, pause, or terminate an application. The following table contains descriptions of the buttons that are common for most applications.

Run Toolbar

Click this button to terminate the current process externally by means of the standard shutdown script.

Clicking the button once invokes soft kill allowing the application to catch the SIGINT event and perform graceful termination (on Windows, the Ctrl+C event is emulated). After the button is clicked once, it is replaced with indicating that subsequent click will lead to force termination of the application, for example on Unix SIGKILL is sent.

Item Tooltip and shortcut Description
Rerun
Ctrl+F5
Click this button to stop the current application and run it again.
When an application is stopped , this button toggles to .
Rerun
Ctrl+F5
Click this button to rerun the current application.
This button appears, when an application is stopped . When an application is running, this button toggles to .
Stop
Ctrl+F2
Restore Layout Click this button to have the changes to the current layout abandoned and return to the default state.
Pin Tab Click this button to pin or unpin the current tab. You may need to pin a tab to prevent it from closing automatically when the maximum number of tabs is reached in this window.
Close
Ctrl+Shift+F4
Click this button to close the selected tab of the Run tool window and terminate the current process.

Context Menu Commands

Item Description
Compare with Clipboard Opens the Clipboard vs Editor dialog that allows you to view the differences between the selection from the editor and the current clipboard content. This dialog is a regular comparing tool that enables you to copy the line at caret to the clipboard, find text, navigate between differences and manage white spaces.
Copy URL Choose this command to copy the current URL to the system clipboard. This command only shows on a URL, if it is included in an application’s output.
Create Gist Choose this command to open the Create Gist dialog.
Clear All Clears the output window.

Console Toolbar

This button is available in the Debug console. If it is pressed, you can enter commands in the console and view output.
Note that in the debug console, code completion is available:

It’s also possible to scroll through the history of commands with the up and down arrow keys.

Press this button to show the Debug Console History dialog, where one can view the console entries and navigate through them, using the arrow keys.

Click OK to close the dialog.

Karma Server tab

The tab is shown only when you run JavaScript unit tests using the Karma test runner. Use the tab to view and analyze information from the server.

Run tool window

The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied.

If you re-run an application, the new output overwrites the contents of the tab. To preserve the output of an application, even if you re-run it, pin the output tab.

The appearance of each tab depends on the type of the application being run and can include additional toolboxes and panes.

The main toolbar of the Run tool window lets you rerun, stop , pause , or terminate an application. The following table contains descriptions of the buttons that are common for most applications.

Run Toolbar

Item Tooltip and shortcut Description
Up/down the Stack Trace
Ctrl+Alt+Up Ctrl+Alt+Down )
Click this button to navigate up or down in the stack trace and have the cursor jump to the corresponding location in the source code.
Use Soft Wraps Click this button to toggle the soft wrap mode of the output.
Scroll to the end Click this button to navigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
Print Click this button to send the console text to the default printer.
Clear All Click this button to remove all text from the console. This function is also available from the context menu of the console.
Show Python prompt
Browse history
Ctrl+Alt+E

Click this button to terminate the current process externally by means of the standard shutdown script.

Clicking the button once invokes soft kill allowing the application to catch the SIGINT event and perform graceful termination (on Windows, the Ctrl+C event is emulated). After the button is clicked once, it is replaced with indicating that subsequent click will lead to force termination of the application, for example on Unix SIGKILL is sent.

Item Tooltip and shortcut Description
Rerun
Ctrl+F5
Click this button to stop the current application and run it again.
When an application is stopped , this button toggles to .
Rerun
Ctrl+F5
Click this button to rerun the current application.
This button appears, when an application is stopped . When an application is running, this button toggles to .
Stop
Ctrl+F2
Restore Layout Click this button to have the changes to the current layout abandoned and return to the default state.
Pin Tab Click this button to pin or unpin the current tab. You may need to pin a tab to prevent it from closing automatically when the maximum number of tabs is reached in this window.
Close
Ctrl+Shift+F4
Click this button to close the selected tab of the Run tool window and terminate the current process.

Context Menu Commands

Item Description
Compare with Clipboard Opens the Clipboard vs Editor dialog that allows you to view the differences between the selection from the editor and the current clipboard content. This dialog is a regular comparing tool that enables you to copy the line at caret to the clipboard, find text, navigate between differences and manage white spaces.
Copy URL Choose this command to copy the current URL to the system clipboard. This command only shows on a URL, if it is included in an application’s output.
Create Gist Choose this command to open the Create Gist dialog.
Clear All Clears the output window.

Console Toolbar

Item Tooltip and shortcut Description
Up/down the Stack Trace
Ctrl+Alt+Up Ctrl+Alt+Down )
Click this button to navigate up or down in the stack trace and have the cursor jump to the corresponding location in the source code.
Use Soft Wraps Click this button to toggle the soft wrap mode of the output.
Scroll to the end Click this button to navigate to the bottom of the stack trace and have the cursor jump to the corresponding location in the source code.
Print Click this button to send the console text to the default printer.
Clear All Click this button to remove all text from the console. This function is also available from the context menu of the console.

Karma Server tab

The tab is shown only when you run JavaScript unit tests using the Karma test runner. Use the tab to view and analyze information from the server.

Windows interoperability with Linux

The Windows Subsystem for Linux (WSL) is continuously improving integration between Windows and Linux. You can:

  • Run Windows tools (ie. notepad.exe) from a Linux command line (ie. Ubuntu).
  • Run Linux tools (ie. grep) from a Windows command line (ie. PowerShell).
  • Share environment variables between Linux and Windows. (Build 17063+)

If you’re running Creators Update (Oct 2017, Build 16299) or Anniversary Update (Aug 2016, Build 14393), jump to the Earlier versions of Windows 10.

Run Linux tools from a Windows command line

Run Linux binaries from the Windows Command Prompt (CMD) or PowerShell using wsl (or wsl.exe ).

Binaries invoked in this way:

  • Use the same working directory as the current CMD or PowerShell prompt.
  • Run as the WSL default user.
  • Have the same Windows administrative rights as the calling process and terminal.

The Linux command following wsl (or wsl.exe ) is handled like any command run in WSL. Things such as sudo, piping, and file redirection work.

Example using sudo to update your default Linux distribution:

Your default Linux distribution user name will be listed after running this command and you will be asked for your password. After entering your password correctly, your distribution will download updates.

Mixing Linux and Windows commands

Here are a few examples of mixing Linux and Windows commands using PowerShell.

To use the Linux command ls -la to list files and the PowerShell command findstr to filter the results for words containing «git», combine the commands:

To use the PowerShell command dir to list files and the Linux command grep to filter the results for words containing «git», combine the commands:

To use the Linux command ls -la to list files and the PowerShell command > out.txt to print that list to a text file named «out.txt», combine the commands:

The commands passed into wsl.exe are forwarded to the WSL process without modification. File paths must be specified in the WSL format.

To use the Linux command ls -la to list files in the /proc/cpuinfo Linux file system path, using PowerShell:

To use the Linux command ls -la to list files in the C:\Program Files Windows file system path, using PowerShell:

Run Windows tools from Linux

WSL can run Windows tools directly from the WSL command line using [tool-name].exe . For example, notepad.exe .

\’` as the file path.» Currently it I can just enter `notepad.exe foo.txt` and it seems to work fine, so explaining a situation where the file path is needed would be helpful. —>

Applications run this way have the following properties:

  • Retain the working directory as the WSL command prompt (for the most part — exceptions are explained below).
  • Have the same permission rights as the WSL process.
  • Run as the active Windows user.
  • Appear in the Windows Task Manager as if directly executed from the CMD prompt.

Windows executables run in WSL are handled similarly to native Linux executables — piping, redirects, and even backgrounding work as expected.

To run the Windows tool ipconfig.exe , use the Linux tool grep to filter the «IPv4» results, and use the Linux tool cut to remove the column fields, from a Linux distribution (for example, Ubuntu) enter:

Let’s try an example mixing Windows and Linux commands. Open your Linux distribution (ie. Ubuntu) and create a text file: touch foo.txt . Now use the Linux command ls -la to list the direct files and their creation details, plus the Windows PowerShell tool findstr.exe to filter the results so only your foo.txt file shows in the results:

Windows tools must include the file extension, match the file case, and be executable. Non-executables including batch scripts. CMD native commands like dir can be run with cmd.exe /C command.

For example, list the contents of your Windows files system C:\ directory, by entering:

Or use the ping command to send an echo request to the microsoft.com website:

Parameters are passed to the Windows binary unmodified. As an example, the following command will open C:\temp\foo.txt in notepad.exe :

This will also work:

Share environment variables between Windows and WSL

WSL and Windows share a special environment variable, WSLENV , created to bridge Windows and Linux distributions running on WSL.

Properties of WSLENV variable:

  • It is shared; it exists in both Windows and WSL environments.
  • It is a list of environment variables to share between Windows and WSL.
  • It can format environment variables to work well in Windows and WSL.
  • It can assist in the flow between WSL and Win32.

Prior to 17063, only Windows environment variable that WSL could access was PATH (so you could launch Win32 executables from under WSL). Starting in 17063, WSLENV begins being supported. WSLENV is case sensitive.

WSLENV flags

There are four flags available in WSLENV to influence how the environment variable is translated.

  • /p — translates the path between WSL/Linux style paths and Win32 paths.
  • /l — indicates the environment variable is a list of paths.
  • /u — indicates that this environment variable should only be included when running WSL from Win32.
  • /w — indicates that this environment variable should only be included when running Win32 from WSL.

Flags can be combined as needed.

Read more about WSLENV, including FAQs and examples of setting the value of WSLENV to a concatenation of other pre-defined environment vars, each suffixed with a slash followed by flags to specify how the value should be translated and passing variables with a script. This article also includes an example for setting up a dev environment with the Go programming language, configured to share a GOPATH between WSL and Win32.

Disable interoperability

Users may disable the ability to run Windows tools for a single WSL session by running the following command as root:

To re-enable Windows binaries, exit all WSL sessions and re-run bash.exe or run the following command as root:

Disabling interop will not persist between WSL sessions — interop will be enabled again when a new session is launched.

Earlier versions of Windows 10

There are several differences for the interoperability commands on earlier Windows 10 versions. If you’re running a Creators Update (Oct 2017, Build 16299), or Anniversary Update (Aug 2016, Build 14393) version of Windows 10, we recommend you update to the latest Windows version, but if that’s not possible, we have outlined some of the interop differences below.

  • bash.exe has been replaced with wsl.exe .
  • -c option for running a single command isn’t needed with wsl.exe .
  • Windows path is included in the WSL $PATH .
  • The process for disabling interop is unchanged.

Linux commands can be run from the Windows Command Prompt or from PowerShell, but for early Windows versions, you man need to use the bash command. For example:

Things such as input, piping, and file redirection work as expected.

The WSL commands passed into bash -c are forwarded to the WSL process without modification. File paths must be specified in the WSL format and care must be taken to escape relevant characters. Example:

When calling a Windows tool from a WSL distribution in an earlier version of Windows 10, you will need to specify the directory path. For example, from your WSL command line, enter:

In WSL, these executables are handled similar to native Linux executables. This means adding directories to the Linux path and piping between commands works as expected. For example:

Читайте также:  Создание текстового файл linux
Оцените статью