zoukankan      html  css  js  c++  java
  • TD打印 log方法

    1,如果没有.vscode文件就将添加,并且添加文件c_cpp_properties.json、launch.json和tasks.json三个文件

      c_cpp_properties.json文件

    {
        "configurations": [{
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "/git/td-platform/tdGUI/x86/output/include",
                "/git/td-platform/tdGUI/x86/usr/include"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }],
        "version": 4
    }

    2,修改launch.json文件

      I)如果有launch.json文件

      修改launch.json文件

                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    }
                ]

      修改为

    "preLaunchTask": "compile",

      II)如果没有launch.json文件就添加launch.json

      修改 "program": "/home/mxy/TD/td_test_code/CairoDemo-v1.0.0-20191108/bin/CairoDemo",

      /home/mxy/TD/td_test_code/CairoDemo-v1.0.0-20191108/bin/ 当前程序代码路经

      CairoDemo 当前编译程序名称,在Makefile的EXENAME := CairoDemo中

     launch.json文件

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "(gdb) Launch",
                "type": "cppdbg",
                "request": "launch",
                "program": "/home/mxy/TD/td_test_code/CairoDemo-v1.0.0-20191108/bin/CairoDemo",
                "args": [],
                "stopAtEntry": false,
                "cwd": "${workspaceFolder}",
                "environment": [
                    {
                        "name": "LD_LIBRARY_PATH",
                        "value": "/tdGUI/x86/output/lib:/tdGUI/x86/usr/lib"
                    }
                ],
                "externalConsole": false,
                "MIMode": "gdb",
                "preLaunchTask": "compile",
            }
        ]
    }

    3,在.vscode下添加tasks.json文件

    {
        // See https://go.microsoft.com/fwlink/?LinkId=733558
        // for the documentation about the tasks.json format
        "version": "2.0.0",
        "tasks": [
            {
                "type": "shell",
    
                "label": "compile",
    
                "command": "td-tool mc x86; td-tool mk x86; td-tool stop; td-tool start /; sleep 0.5"
    
            }
        ]
    }

    4,运行调试模式

  • 相关阅读:
    怎样设计一个好玩的游戏——游戏设计的艺术
    app-framework学习--nav的Scroller禁用与启用
    Codeforces Round #316 (Div. 2)
    为什么不能用memcached存储Session?
    C++ 虚函数的缺省參数问题
    picker-view 组件 的value失效问题
    java语句中的重定向函数
    QueryRunner 错误
    实战记录4
    Eclipse的DEgub调试乱跳
  • 原文地址:https://www.cnblogs.com/senior-engineer/p/13949500.html
Copyright © 2011-2022 走看看