当前位置:网站首页>How to adjust the default output of vscode to the debugging console to the terminal and the problem of garbled code in both
How to adjust the default output of vscode to the debugging console to the terminal and the problem of garbled code in both
2022-07-24 22:10:00 【The senming Gang is bigger than the black tiger gang】
vscode In the configuration, the default configuration for each debugging is output from the terminal , But among the results output in this way , There is a lot of system information that we don't need , In the debugging console, there is only the concise part of the information we want .
To output to the debug console by default , Just put the launch.json in console The configuration of one item is changed to internalConsole that will do .
console Three valid configurations :
internalConsole: Internal console .integratedTerminal: Internal terminal .externalTerminal: External terminal .
One 、VScode The default output of to the debug console
-- Meta class
Shape = {
area = 0}
-- Basic class methods new
function Shape:new (o,side)
o = o or {
}
setmetatable(o, self)
self.__index = self
side = side or 0
self.area = side*side;
return o
end
-- Basic class methods printArea
function Shape:printArea ()
print(" Area is ",self.area)
end
-- Create objects
myshape = Shape:new(nil,10)
myshape:printArea()
Square = Shape:new()
-- Derived class methods new
function Square:new (o,side)
o = o or Shape:new(o,side)
setmetatable(o, self)
self.__index = self
return o
end
-- Derived class methods printArea
function Square:printArea ()
print(" The square area is ",self.area)
end
As shown in the figure below ,VScode From downloading to writing a program, the default output is the debugging console .
Why is there no garbled code ? Here's the picture , The console program is UTF-8 code , Your program code is also UTF-8 There will be no garbled code .

Two 、VScode Default output to terminal
Here's the picture : First you have to be in the .VSCODE Medium launch.json Add a clause to the document "console":"integratedTerminal".
But the problem is , In this way, your output results are garbled , Here's the picture :
Because the terminal code is GB2312, And your code program is UTF-8, Of course, there will be garbled code , Yours .lua Documents or others File is UTF-8 Code, but your terminal is GBK code , Now we just need to put UTF8 Change the code to GBK code .
Search... As shown in the figure below GB2312 Coding can solve the garbled code .
边栏推荐
- "Iruntime": undeclared identifier
- Pyqt5 uses qfile and qdatastream to read and write binary files
- One click compilation and installation of redis6.2.4
- PCL点云处理之pcd文件转txt文件(单个或多个批量转换)(六十三)
- Leetcode 226. flip binary tree
- Integrated swagger learning
- Web3安全 Go+Security
- Redefine analysis - release of eventbridge real-time event analysis platform
- Function default parameter pit avoidance Guide
- Machine learning kmeans
猜你喜欢
![[Apipost和Apifox哪个更好用?看这篇就够了!]](/img/58/4dfe5c56d12e8e88b0a7f3583ff0a4.jpg)
[Apipost和Apifox哪个更好用?看这篇就够了!]

Composability and Recursion in snarkyJS
![[good question with two points]](/img/a2/8c0610c4aba6ace4b003efd92c31cd.png)
[good question with two points]

Apipost签约中国电信!携手加速企业数字化变革

通过企业微信自建应用向微信推送信息

有序表之AVL树

Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises

RISC0:Towards a Unified Compilation Framework for Zero Knowledge
![[icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt](/img/be/6a3f53070c2ffc9610a77d4e910f91.png)
[icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt

ACL 2022 | 基于最优传输的对比学习实现可解释的语义文本相似性
随机推荐
数据库之-元数据 DatabaseMetaData 初学
Wechat applet monitoring real-time geographical location change event interface application
[good question with two points]
Gradle learning - gradle advanced instructions
Database - Metadata databasemetadata beginner
Both Chen Chunhua and Mo Yan have words of suffering
陈春花与莫言,都有苦难言
【南瓜书ML】(task4)神经网络中的数学推导
Implement redis sentinel to simulate master failure scenarios
How to refine the top products of the website in the top 10 of the list for three consecutive months?
C # use SQLite
小程序地理位置接口申请
Image processing notes (1) image enhancement
Feeding Program Source Code to ZK VMs
LED digital display driver IC and anti-interference LED digital tube display driver ic-vk1s68c ssop24 are applicable to finger clip pulse oximeter, arm electronic sphygmomanometer, thermometer, fetal
一键编译安装redis6.2.4
Helm —— 强大的 Kubernetes 应用的包管理工具
SVM——针对线性可分(下)
Poj2308 continuously look at dfs+bfs+ optimization
One click compilation and installation of redis6.2.4