Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Debugging ATL control

Debugging ATL control

Scheduled Pinned Locked Moved ATL / WTL / STL
questioncsharpc++htmlvisual-studio
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roel_
    wrote on last edited by
    #1

    Hi, I'm writing my first ATL control that will be used inside an HTML page. I used the project wizard to create a simple control, I build it and tested it in the ActiveX test container. Now I want to start making my own changes and stepping through the code a bit to see how it works. How can I test a control and set breakpoints in the Visual Studio debugger so that it stops at that point, just like a 'normal' program? Thanks.

    R 1 Reply Last reply
    0
    • R roel_

      Hi, I'm writing my first ATL control that will be used inside an HTML page. I used the project wizard to create a simple control, I build it and tested it in the ActiveX test container. Now I want to start making my own changes and stepping through the code a bit to see how it works. How can I test a control and set breakpoints in the Visual Studio debugger so that it stops at that point, just like a 'normal' program? Thanks.

      R Offline
      R Offline
      roel_
      wrote on last edited by
      #2

      Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.

      J _ 2 Replies Last reply
      0
      • R roel_

        Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #3

        You can also for a break point using __asm int 3. That'll halt the program and show you the "program has crashed dialog, do you wish to debug?"-dialog. From there you can attach to the program which embeds your control. -- Booohoo!

        R 1 Reply Last reply
        0
        • R roel_

          Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.

          _ Offline
          _ Offline
          _Magnus_
          wrote on last edited by
          #4

          Or set the tstcon32 as the executable for the debugsession. /Magnus


          - I don't necessarily agree with everything I say

          R 1 Reply Last reply
          0
          • J Jorgen Sigvardsson

            You can also for a break point using __asm int 3. That'll halt the program and show you the "program has crashed dialog, do you wish to debug?"-dialog. From there you can attach to the program which embeds your control. -- Booohoo!

            R Offline
            R Offline
            roel_
            wrote on last edited by
            #5

            Aha, I didn't know I could do that from an ActiveX control as well. Thanks!

            1 Reply Last reply
            0
            • _ _Magnus_

              Or set the tstcon32 as the executable for the debugsession. /Magnus


              - I don't necessarily agree with everything I say

              R Offline
              R Offline
              roel_
              wrote on last edited by
              #6

              It keeps getting better ;) Thanks!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups