Home > Article > Development Tools > How to output sublime
There are three ways to output content in Sublime Text: Use the print() statement to output in the "Console" panel. Set breakpoints and view the output through the debugger's Console tab. Redirect stdout and view the output via the output panel.
How to output content in Sublime Text
Sublime Text is a popular text editor that provides There are many ways to output content.
Method 1: Using the Console panel
Ctrl
~
(Windows) or Cmd
~
(macOS) Open the Console panel. print()
statement followed by the value you want to print. Method 2: Use debugging features
F7
(Windows) or Cmd
F7
(macOS) to open the debugger. Method 3: Redirect stdout
<code class="json">{ "sublime_stdout": true }</code>
print()
statement to output the value. The Ctrl
(Windows) or `Cmd`
(macOS). Example:
<code class="python"># 方法 1:使用“控制台”面板 print("Hello World") # 方法 2:使用调试功能 import pudb; pudb.set_trace() print("Hello World") # 方法 3:重定向 stdout print("Hello World")</code>
The above is the detailed content of How to output sublime. For more information, please follow other related articles on the PHP Chinese website!