当前位置:网站首页>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 .
边栏推荐
- Diou and ciou loss of loss function
- Day10: declarative transaction control
- [postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose
- Web3安全 Go+Security
- 【考研英语词汇训练营】Day 11 —— offer ,form ,maintain ,critical
- ASP.NET Core 6.0 基于模型验证的数据验证
- 损失函数之Diou和Ciou loss
- Clever use of sort (list & lt; T & gt;, comparator & lt;? Super T & gt;) comparator
- leetcode:不可能得到的最短骰子序列【思维题 + 分组思想】
- PR 2022 22.5 Chinese version
猜你喜欢

day10:声明式事务控制

One click compilation and installation of redis6.2.4

Using FRP to achieve intranet penetration

Image processing notes (1) image enhancement

GlideModule AppGlideModule和Generated API详解
[email protected]"/>@typescript-eslint/ [email protected]
![Leetcode: the shortest dice sequence impossible to get [thinking questions + grouping ideas]](/img/89/0789cd381302237a28f3f18b3bfa74.png)
Leetcode: the shortest dice sequence impossible to get [thinking questions + grouping ideas]

Everything about database, database and table is here

From A76 to A78 -- learning arm microarchitecture in change

集成Swagger 学习
随机推荐
Apipost签约中国电信!携手加速企业数字化变革
Clever use of sort (list & lt; T & gt;, comparator & lt;? Super T & gt;) comparator
对萌新小白电脑运行速度变慢解决的方法get!٩( ‘ω‘ )و get!٩( ‘ω‘ )و
Today's nft/ digital collection hotspot
Sensor experiment - 485 air temperature and humidity
通讯异常判断之通讯心跳信号应用编程
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose
RISC0:Towards a Unified Compilation Framework for Zero Knowledge
Drawing library Matplotlib installation configuration
巧妙使用sort(List<T>,Comparator<? super T>)比较器
AC自动机
Feeding Program Source Code to ZK VMs
One click compilation and installation of redis6.2.4
@typescript-eslint/ [email protected]
What should I pay attention to when selecting DTS database type?
图像处理笔记(1)图像增强
Gradle 学习 ----Gradle 入门
Diou and ciou loss of loss function
【考研英语词汇训练营】Day 11 —— offer ,form ,maintain ,critical
PCL点云处理之找到直线点集的两个端点(五十七)