linux 可视化调试
Get the following extension from the marketplace, and install it into Visual Studio Code.
从市场上获得以下扩展,并将其安装到Visual Studio Code中。
Run any code in debug mode 在调试模式下运行任何代码 Press “Ctrl + Shift + P” to open command palette 按“ Ctrl + Shift + P”打开命令面板 Search for Debug Visualizer 搜索调试可视化器Imagine below visualization on the variable value change
想象一下下面的可视化变量值更改
Plotting of four different types of line graphs covered using Typescript.
使用Typescript绘制的四种不同类型的折线图的绘制。
NOTE: For typescript launch settings, “node.js debugger” is used, and to test, please open the file that needs to be debugged. Remember to add “debugger;” statement to begin debugging.
注意:对于打字稿启动设置,使用“ node.js调试器”,并且要进行测试,请打开需要调试的文件。 记住添加“调试器”; 语句开始调试。
Positive Line graph, i.e., the variable value plotted always increasing.
正线图,即绘制的变量值始终在增加。
Negative Line graph, i.e., the variable value plotted, always decreasing.
负线图(即绘制的变量值)始终减小。
Plotting mix of positive & negative values in the line graph. 在折线图中绘制正负混合值。The below code example adds random value into the array of numbers. To better visualize, the random value is multiplied by two.
下面的代码示例将随机值添加到数字数组中。 为了更好地可视化,将随机值乘以2。
const data = new Array<number>();let currentValue = 0;debugger;for (let j = 0; j < 100; j++) { VisualizeIncLineGraph();}//Single Valuesfunction VisualizeIncLineGraph() { const delta = Math.random() * 2; data.push(currentValue); currentValue += delta;}Open the “Debug Visualizer” and watch on a “data” variable inside the Debug Visualizer input. Please find below live instructions on how to visualize.
打开“ Debug Visualizer”,并在“ Debug Visualizer”输入中监视“ data”变量。 请在下面的实时说明中找到如何进行可视化的说明。
The below code example adds “random negative value” into the array of numbers. To better visualize, the random value is multiplied by two.
下面的代码示例将“ 随机负值”添加到数字数组中。 为了更好地可视化,将随机值乘以2。
function VisualizeDecLineGraph() { const delta = -Math.random() * 2; data.push(currentValue); currentValue += delta;}The below code example adds “random values” into the array of numbers. To better visualize, conditionally checked the random value to mix both positive & negative values.
下面的代码示例将“ 随机值”添加到数字数组中。 为了更好地可视化,有条件地检查了随机值以将正值和负值混合在一起。
function visualizeMix() { var delta = Math.random(); delta = (delta < 0.5) ? 1 : -1; data.push(currentValue); currentValue += delta;}The trick is to write a nested loop with the “visualizeMix” method.
诀窍是使用“ visualizeMix”方法编写一个嵌套循环。
const data = new Array<number>();let currentValue = 0;debugger;for (let j = 0; j < 100; j++) { VisualizeIncLineGraph();}function AddMultipleValues() { for (let j = 0; j < 10; j++) { visualizeMix(); }}function visualizeMix() { var delta = Math.random(); delta = (delta < 0.5) ? 1 : -1; data.push(currentValue); currentValue += delta;}Please find below the complete code; modify the function call according to the plotting.
请在下面找到完整的代码; 根据绘图修改函数调用。
const data = new Array<number>();let currentValue = 0;debugger;for (let j = 0; j < 100; j++) { AddMultipleValues();}function AddMultipleValues() { for (let j = 0; j < 10; j++) { visualizeMix(); }}//Single Valuesfunction VisualizeIncLineGraph() { const delta = Math.random() * 2; data.push(currentValue); currentValue += delta;}function VisualizeDecLineGraph() { const delta = -Math.random() * 2; data.push(currentValue); currentValue += delta;}function visualizeMix() { var delta = Math.random(); delta = (delta < 0.5) ? 1 : -1; data.push(currentValue); currentValue += delta;}Create a simple .Net Core console application using the below command. Assuming .Net Core SDK is already installed.
使用以下命令创建一个简单的.Net Core控制台应用程序。 假设已安装.Net Core SDK。
dotnet new console -o <ProjectName>Corresponding call from the Main method to append four nodes into the LinkedList with values 1,2,3 and 4, which can be visualized.
来自Main方法的相应调用,以将值1、2、3和4附加到LinkedList中的四个节点可以可视化。
var list = new LinkedList<int>();list.Append(1);list.Append(2);list.Append(3);list.Append(4);Now with each linked list append operation, a visualizer node will be created and shown below.
现在,通过每个链接列表追加操作,将创建一个可视化器节点,如下所示。
Notice with each append operation, a node is added into the visualizer as well.
请注意,每个附加操作都会在可视化工具中添加一个节点。
C# Linked List sample project
C#链表示例项目
Typescript line graph project
打字稿线图项目
Will be sharing more visualization soon. Thank you for reading. I hope you like the article..!!
即将分享更多的可视化效果。 感谢您的阅读。 我希望你喜欢这篇文章。
翻译自: https://medium.com/@singhsukhpinder/data-visualization-debugger-5eb3849b1cc1
linux 可视化调试
相关资源:CRT LINUX可视化工具