Viewing 3 reply threads
  • Author
    Posts
    • #4192 Score: 1
      sQ
      Participant
      2 pts

      发现很多老哥耽误在运行时错误,效果反预期等,没时间思考原理性的问题,讨论各种理论上的想法。
      多数情况又是根本不知道问题出在哪里,而不是某个问题该怎么改。
      借助VScode单步调试就很有必要了,可以让你知道:
      1. 运行时崩溃在哪一行,当时的参数都是啥
      2. 效果反预期,大概在哪一步出了异常

      早些时候在vscode上配置hello world都要写task/launch等很懵。现在通过cmake可以一键build和单步调试,只需要装一些插件即可。具体方法相关技术博客备述

      通常效果反预期,除了检查计算方法外,也需要关注数据的变化,比如范围。
      比如计算displace bump 双线性插值的时候,计算的坐标是否符合预期,跟原始坐标相比。
      预期0-1的浮点数实际是不是0-255?计算公式没问题,但是否由于变量类型、数据量纲等导致某些分量恒为0呢?

      当然,ide只是工具,如果不嫌沉重其实clion也挺好用的,印象里可以导入cmakelist的项目直接debug。
      自己也能DEBUG,不用求人✌🏻

      This post has received 1 vote up.
      • This topic was modified 2 years, 2 months ago by sQ.
      • This topic was modified 2 years, 2 months ago by sQ.
      Attachments:
      You must be logged in to view attached files.
    • #4266 Score: 0
      BoyNextDoor
      Participant

      能否详细描述一下 VS Code 的配置方法?
      谢谢!

      • #4324 Score: -1
        sQ
        Participant
        2 pts

        rt

        This post has received 1 vote down.
        Attachments:
        You must be logged in to view attached files.
    • #4267 Score: 0
      TuOne_Chan
      Participant
      -1 pt

      +1

    • #4681 Score: 0
      blackcat9273
      Participant

      vscode 有一个cmake tool 插件安装好后,左下角状态栏会有生成和调试按钮,非常方便,直接点击就能生成和调试程序。

Viewing 3 reply threads
  • You must be logged in to reply to this topic.