- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To demonstrate this problem I have the following (Windows) program which just prints its arguments:
c:\dev>print_args.exe "{\"foo\": 123}" arg[0]: print_args.exe arg[1]: {"foo": 123}
If I run this using VTune (GUI or command line doesn't matter, I'll use the command line for demonstration purposes):
c:\dev>vtune -collect hotspots -- c:\dev\print_args.exe "{\"foo\": 123}"
vtune: Warning: Hardware collection of CPU events is not possible on this system. Microarchitecture performance insights will not be available.
vtune: Warning: To collect microarchitecture performance insights, run the product as administrator.
vtune: Collection started. To stop the collection, either press CTRL-C or enter from another console window: vtune -r c:\dev\r000hs -command stop.
arg[0]: c:\dev\print_args.exe
arg[1]: {foo: 123}
...
We can see that the double quotes around "foo" have been stripped from the arguments sent to the program. This is breaking our actual application which expects to receive a valid JSON string as input.
Is there a better way to report this issue other than the forum? This is quite a big deal for us.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
As fast workaround, could you wrap your application with params by batch script?
run.bat
c:\dev\print_args.exe "{\"foo\": 123}"
vtune -collect hotspots -- RUN_BAT_DIR\run.bat
Thanks, Kirill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems there is a difference between the command-line and GUI handling of this.
The GUI workaround is to use \\" instead of \" but this requires hacking/changing the command line options if you are inheriting the settings from Visual Studio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My use case currently is using VTune in combination with the Visual Studio plugin/add-on so these command-line arguments come from the project's Debugger settings. It seems we can workaround this by manually overriding the inherited settings and adding extra \ to the \".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
Has the solution provided by Kirill worked for you. Please let us know if the issue still persists.
Regards,
Chithra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
We are assuming that the issue got resolved with your workaround itself. So, we would discontinue monitoring this issue. Please raise a new thread if you have further issues.
Regards,
Chithra J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been able to work around the problem, but I still consider this a bug that should be fixed. Thanks for the suggestions all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Couple of years later and I'm stilling hoping this will be fixed at some point...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page