惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
Scott Helme
Scott Helme
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
C
Cybersecurity and Infrastructure Security Agency CISA
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
J
Java Code Geeks
U
Unit 42
The GitHub Blog
The GitHub Blog
H
Help Net Security
T
Tenable Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
Spread Privacy
Spread Privacy
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
T
Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
L
LINUX DO - 最新话题
K
Kaspersky official blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threat Research - Cisco Blogs
C
Check Point Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
宝玉的分享
宝玉的分享
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
Y
Y Combinator Blog
N
News | PayPal Newsroom
M
MIT News - Artificial intelligence
Latest news
Latest news
H
Hacker News: Front Page
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
I
Intezer
爱范儿
爱范儿
F
Fortinet All Blogs
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes

Nemo

再见,2025 Complete ORB-SLAM3 Setup Guide for Jetson Xavier NX with RealSense D455 20250723 再见,2024 Using CertBot for Automatic Secure EMQX Broker Create Your Own GPS Data Publisher Support SSL AGV Dispatching System Technical Documentation Finding Nemo No title 香港賽馬會呈獻系列:黑白——攝影敘事 再见,2023 团团是只猫 Design an FSM for Robot State Machines – Basics of Computer Science Data-driven robot lifespan: Collection 数据驱动的机器人寿命:收集、诊断、预测 Exploring the design space of binary search trees 特首来了 Large language models, explained with a minimum of math and jargon 设计有缓存异步逻辑的监控脚本并测试其资源占用 使用loguru记录串口数据并使用Docker搭建ARM开发环境 State or Status? A*算法两种时间复杂度 /A* Algorithm: Two Types of Time Complexity 使用KD-Tree快速收敛到最近坐标点/Fast convergence to the nearest coordinate point using KD-Tree 翻译 || 总结 - Go语言中的空结构体(The empty struct) 再见,2022 从PE工作报告中能读出什么 Give me miles, give me truth AMR调度系统性能优化/AMR Dispatch System Performance Optimization 条件触发AMR避让流程/Conditionally triggered AMR avoidance process Docker实现调度系统整体部署/Docker implementation of dispatching system overall deployment 调度系统中加密算法的使用/增加SM4补0方法/Use of encryption algorithms in scheduling systems/add SM4 complementary 0 method 一篇关于北京四天三夜的攻略 2022 藏疆自驾 策划/招募书 AMR仿真模型/AMR Simulation Model 东东有鱼2022年会分享 使用perf-FlameGraph监控系统性能 Beyond Compare 4删除试用 你的灵魂有香气 Pyinstaller打包Python项目 [转载]Python中的单例模式的几种实现方式的及优化 - Nemo 再见! 2020 1024 UML软件建模 入职优必选一个月 写论文时 那些让你开心的软件 - Nemo 分享一个记录刷题次数的模版 LeetCode-查找表类算法题精析 PyCharm 调用vs 2010 C++库导致提示报错R6034解决方法 MySQL基础教程 多种数据结构的Python实现形式 字节跳动-挑战字符串 选择排序 二分查找和大O表示法 算法中的动态规划问题 高高手课程-青山裕企人像摄影 笔记(内含福利)
在vscode的Dev Container中构建.NET开发环境及使用doxygen和graphviz绘制函数调用图
Nemo · 2023-05-24 · via Nemo

背景

这篇是入职新公司的第一篇博客,为了熟悉公司现有技术方便进行后续的开发,接触的第一份代码就是机器人的控制器,技术栈是.net C#,我突然明白公司官网上那句並聯同Microsoft 合作夥伴協助建立技術發展平台的含义是什么了。

最早听说.net framework还是很久之前看到《编程的奥秘》中提到过,并没有深入的探索,这次就得好好学习下了。

环境搭建

项目文档中建议使用MS Visual Studio 2022以及.NET SDK 6.0,由于一直不太适应VS系列的界面和为了使用Github Copilot,决定使用VSCode+Docker搭建开发环境。

添加Dev Container的配置文件

选择C#和.NET SDK 6.0就可以了

设置Nuget源

容器启动后配置Nuget源,从仓库下载相应的包后,运行dotnet nuget add source {path} -n "XX"修改下源的顺序,运行:dotnet build XXX.sln看能否正常编译。

Copilot

因为在香港,可以很流畅的使用Github,但在深圳的时候,使用了clash科学上网,这样使用Copilot Lab时会报proxy错误,详见

解决这个问题也很简单,只要在settting.json中设置:

    "remote.extensionKind": {
        "GitHub.copilot-labs": ["ui"],
    }

就可以了~

不得不说,Copilot在阅读代码时的帮助很大,快速解释代码、生成注释,测试….. 基本不用再去频繁的请教同事了~

绘制函数调用图

这样可以很快速的了解项目结构和调用关系,通用的方式是使用doxygen和graphviz绘制函数调用图,下面是步骤:

安装

$ sudo apt-get install doxygen
$ sudo apt-get install graphviz

生成Doxygen配置文件

$ doxygen -g XXX.doxygen

然就就可以修改生成配置了,官网有详细的说明,这里不多赘述,常用的几个配置如下:

# document all entities in the project.
EXTRACT_ALL            = YES

# document all static members of a file.
EXTRACT_STATIC         = YES

# specify the root directory that contains the project's source files.
INPUT                  = /home/XXX/source

# search sub-directories for all source files.
RECURSIVE              = YES

# include the body of functions and classes in the documentation.
INLINE_SOURCES         = YES

# generate visualization graph by using dot program (part of graphviz package).
HAVE_DOT               = YES

DOT_PATH      = $(YOUR_DOT_PATH)

最后直接运行:

$ doxygen XXX.doxygen

就好了,可以很清晰的看到对象之间的关系。