I've created a simple program printing "Hello world" 1000 times in C. Now I want to test very sleepy profiler, but it doesn't see the running program among processes. I run the application in the debug mode, visual studio 2010.
-
it would have taken you the same time to write at least a hint – pojo Apr 04 '11 at 06:52
-
it was a failed attempt at humour. :( – Mitch Wheat Apr 04 '11 at 06:58
-
I don't see the running program in the list of processes – pojo Apr 04 '11 at 07:10
-
@pojo : is your program still running when you try to attach to it? 1000 times through a loop presumably won't take very long.... – Mitch Wheat Apr 04 '11 at 07:11
-
it waits for the user's input, so it's running. – pojo Apr 04 '11 at 07:13
-
You can get the info from here. [VerySleepy](https://github.com/VerySleepy/verysleepy) – ani627 Jan 14 '20 at 09:55
3 Answers
Alternatively you can also launch the profiler first, then run your program via File/Launch...
Shameless plug: You can use the modified version of 'Very sleepy' that allows you to start the profiling target w/ profiling paused, and with an API that allows you to start/stop profiling programmatically here: http://hoffesommer.com/weblog/2011/06/17/very-sleepy-0_7_2-cpp-profiler-now-with-api/

- 61
- 4
-
-
2Here is mhoffesommer's fork [repo on GitHub](https://github.com/mhoffesommer/Very-Sleepy) from the original blog post (since the blog no longer appears to be publicly accessible). – SleuthEye Feb 13 '18 at 13:32
-
If you're using Vista or Windows 7, you may need to run Very Sleepy as an Administrator so it can see (and list) the process.

- 354
- 3
- 10
I would suggest you to use process explorer. Launch it before you launch your program, and you will see it appearing on the list, and know its identifier, and even its threads if you wish it, by going to properties.
So when you launch sleepy, you will exactly now the PID and TID you are looking for.

- 2,592
- 2
- 27
- 39