Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug libuv #6

Open
huenchao opened this issue Oct 11, 2019 · 2 comments
Open

debug libuv #6

huenchao opened this issue Oct 11, 2019 · 2 comments

Comments

@huenchao
Copy link
Owner

https://blog.csdn.net/zouwm12/article/details/100150981

@huenchao
Copy link
Owner Author

我是利用cmake编译test文件~ 然后调试

1)首先你想自己创建一个test文件,比如说叫test-abc.c,那你就在test/下面创建一个。
image

2)然后你去CMakeLists.txt文件下,把这个路径加进去。
image

3)然后你去test/test-list.h 下加上abc,TEST_ENTRY和TEST_DECLARE都叫abc。
image
image

4)然后你按照官网给都cmake编译的方式操作即可。

5) 最后你可以在out/cmake/下,找到uv_run_tests这个可执行文件。

6)然后你执行一下就好了。
image

@huenchao
Copy link
Owner Author

huenchao commented Oct 13, 2019

另外~ 强烈推荐使用clion
1) 把源代码下载下来,用它打开这个工程,然后点击build,选择build project,一步到位,不用上面这么麻烦。。
image

2) 这里选择uv_run_tests 不出意外在最下面
image

3)然后你再编辑一下这个,
image
image
我写的是run_once,说明我打算debug test-run-once.c这个文件,你想debug那个,你自己换那个就行。

  1. 最后打上断点,按动小甲虫就行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant