Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 801345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:25:39+00:00 2026-05-14T23:25:39+00:00

Does anyone know of a way I can code-profile my Windows Sidebar Gadget? I’ve

  • 0

Does anyone know of a way I can code-profile my Windows Sidebar Gadget?

I’ve played around with the code-profiling tool in IE8’s “Developer Tools” and the code-profiling included in Visual Studio 2010, but I can’t find a way to include the System.* API, which my gadget relies on (as it is standard in the Sidebar environment). The gadget also relies on cross-domain AJAX requests; which is normally permitted in the Sidebar environment.

By code-profiling I primarily mean:

  • Function call count
  • Function execution time

I’ve tried the following using Visual Studio 2010 and the Performance Wizard:

  • Using “Instrumentation” mode with the “An ASP.NET or JavaScript application” selected. However the gadget opens in Internet Explorer instead of Windows Sidebar
  • Using “Instrumentation” mode with the “An executable” option selected, and selecting Sidebar.exe. However, I get the error “Error VSP1030: Invalid, mismatched, or no PDB file was found for C:\Users\Matt\Desktop\Windows Sidebar\sidebar.exe“
  • Using “CPU Sampling” mode with the “An ASP.NET or JavaScript application” selected. However the gadget opens in Internet Explorer instead of Windows Sidebar

When using the “Attach to Process” option in the Analyse -> Profiler menu, I can successfully attach to the sidebar.exe process, but the profiler returns data about the actual Sidebar process, and no information about my Gadget.

I don’t have a Project/Solution file for my Gadget.

Regards,
Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:25:39+00:00Added an answer on May 14, 2026 at 11:25 pm

    I’m on the VS Profiler team, so feel free to ask any clarifying questions.

    If you want exact metrics (execution time, call counts), then you should use instrumentation. With instrumentation, the profiler will show you data for any binaries you instrument as well as one level of callees (e.g. if you call string.Concat directly from your instrumented binary, the profiler will show you how many times you called it and how long (in aggregate) the calls took). The profiler will not show you data for binaries that you don’t instrument.

    Have you tried instrumentation profiling? What sort of data are you seeing?

    If you want, you can also try a statistical approach to profiling: sampling. Sampling is lighter-weight than instrumentation and is often good as a first pass to figure out, at a high level, where your CPU is doing the most work. With sampling, the profiler takes snapshots of the call stack at specified intervals (this is similar to breaking into the debugger to see what’s currently executing). It then aggregates the snapshots to create a call tree.

    If you give me a better idea of how you’re trying to profile, I can help you more. Are you using the profiler from VS or from the command-line? Do you have a VS solution/project for your Sidebar Gadget?

    You can also check out our blog or our MSDN documentation for more info.


    Update:

    The profiler’s JavaScript profiling functionality was primarily targeted at IE8, so I’m not sure if it will collect data against another process like sidebar.exe that (I’m assuming) hosts the IE JavaScript engine. Still, you should at least be able to use the profiler to collect data against your managed code.

    For instrumentation, you will want to go with your second option (“An executable”), and in the Performance Explorer, you will want to have two targets:

    1. sidebar.exe, not instrumented (since you don’t have the PDB) – you can right-click the target and uncheck the “Instrument” option to suppress instrumentation
    2. foo.dll (whatever your Gadget DLL is called), instrumented – you might have to manually add this target (right-click on the Targets folder, select “Add Target Binary…”), but be sure to enable the “Instrument” option and ensure that its PDB is sitting next to it

    To understand more about performance targets, see this blog post. With this setup, just click the “Start Profiling” button. Instrumentation should succeed and you should get trace profiling data for your Gadget.

    For sampling, you can either launch or attach to the process. Attaching to the process only works if:

    • The process is running on the v4 CLR; or
    • The process has the correct profiling environment variables set (see below for what this means)

    Profiling a pre-v4 CLR process requires some environment variables be set in the target process. Essentially, you will need to kill the sidebar.exe process and then re-launch it using the profiler’s command-line tools. A walkthrough of how to do this is available on MSDN.

    The other option, sampling launch, can be done from the command-line (refer again to the MSDN article), or from the VS UI. Choose “CPU Sampling” with “An executable (.EXE file)”, then shutdown any currently running instances of sidebar.exe, right-click on the newly-created target in the Performance Explorer, choose “Properties”, and modify the command-line arguments as needed. Launching the profiler should then work.

    Let me know if you hit any more issues. Sorry this isn’t easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a way i can extract all jpg images from a
Does anyone know a way to export the VBA code from a number of
Does anyone know a way to auto-generate database tables for a given class? I'm
Does anyone know a way to find out programatically which physical disk holds a
does anyone know a way to call a generic method of a base class
Does anyone know a way to open up an instance of the operating system
Does anyone know a way to open a 2nd form in a .NET application
Does anyone know any simple way to retrieve the country from a given IP
Does anyone know of a way to declare a date constant that is compatible
Does anyone know of a way to alter a computed column without dropping the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.