当前位置:网站首页>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 .
边栏推荐
- Circom 2.0: A Scalable Circuit Compiler
- Makefile basics -- extensions
- 从A76到A78——在变化中学习ARM微架构
- Drawing library Matplotlib installation configuration
- [icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt
- Composability and Recursion in snarkyJS
- 数据库之-元数据 DatabaseMetaData 初学
- Leetcode 226. flip binary tree
- Sensor experiment - 485 air temperature and humidity
- Database - Metadata databasemetadata beginner
猜你喜欢

【南瓜书ML】(task4)神经网络中的数学推导

【考研词汇训练营】Day 12 —— native,separate,figure,contribute,species,assumption,suppose
![[e-commerce operation] teach you these tips to bid farewell to invalid preset replies](/img/5b/6682c613305deb3dc15401077d38a0.png)
[e-commerce operation] teach you these tips to bid farewell to invalid preset replies

通讯异常判断之通讯心跳信号应用编程

ACL 2022 | 基于最优传输的对比学习实现可解释的语义文本相似性

CAD text styles

【二分好题】

Use of templates

实现redis哨兵,模拟master故障场景

From A76 to A78 -- learning arm microarchitecture in change
随机推荐
Win10 solution Base64
QT学习之VS创建QT项目显示未将对象引用设置到对象的实例
使用frp实现内网穿透
巧妙使用sort(List<T>,Comparator<? super T>)比较器
What are the source database types supported by Alibaba cloud DTS?
Diou and ciou loss of loss function
Gradle 学习 ----Gradle 与Idea整合
Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises
PCL点云处理之ply文件读取与保存(五十四)
Local data enhancement method of icml2022 | graph neural network
Machine learning kmeans
2022 Niuke multi school 7.23
leetcode:不可能得到的最短骰子序列【思维题 + 分组思想】
[icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt
Circom 2.0: A Scalable Circuit Compiler
Image processing notes (1) image enhancement
Poj2308 continuously look at dfs+bfs+ optimization
【ICML2022】气候变化与机器学习:机遇、挑战与考虑,121页ppt
Clever use of sort (list & lt; T & gt;, comparator & lt;? Super T & gt;) comparator
How to modify the IP address of kubernetes node?