当前位置:网站首页>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 .
边栏推荐
- Implement redis sentinel to simulate master failure scenarios
- Calling Laser Galvanometer control in the application and development tutorial of motion control card
- My love lesson 2 - remove webpage pop-up
- Sensor experiment - 485 air temperature and humidity
- Web3安全 Go+Security
- PCL点云处理之边界提取(五十八)
- 2022牛客多校7.23
- Build Tencent cloud website server at low cost (build your own website server)
- leetcode:不可能得到的最短骰子序列【思维题 + 分组思想】
- Gradle learning - gradle advanced instructions
猜你喜欢

运动控制卡应用开发教程之调用激光振镜控制

大咖对话:品牌扎堆数藏赛道,下半场的机遇、挑战在哪里?

Circom 2.0: A Scalable Circuit Compiler

Gradle学习集合整合

Calling Laser Galvanometer control in the application and development tutorial of motion control card

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

Both Chen Chunhua and Mo Yan have words of suffering

Gradle 学习 ----Gradle 进阶说明

How to output position synchronization of motion control
![[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
随机推荐
Circom 2.0: A Scalable Circuit Compiler
大咖对话:品牌扎堆数藏赛道,下半场的机遇、挑战在哪里?
Circom 2.0: A Scalable Circuit Compiler
集成Swagger 学习
第二十周作业
Helm —— 强大的 Kubernetes 应用的包管理工具
【考研词汇训练营】Day 12 —— native,separate,figure,contribute,species,assumption,suppose
[Apipost和Apifox哪个更好用?看这篇就够了!]
Drawing library Matplotlib installation configuration
ASP. Net core 6.0 data validation based on model validation
[icml2022] climate change and machine learning: opportunities, challenges and considerations, 121 ppt
Win10 solution Base64
Web3安全 Go+Security
ansible-playbook 可用参数
有序表之AVL树
ACL 2022 | 基于最优传输的对比学习实现可解释的语义文本相似性
吾爱第二课-去除网页弹窗
SVM - for linear separability (Part 2)
Using FRP to achieve intranet penetration
Mathematical derivation in [pumpkin Book ml] (task4) neural network