If you are using JScript you just add a "debugger;" statement into your OnLoad event handler.
If you are using managed code:
1. Launch VS.
2. Choose Debug Process from the Tools menu.
3. Select your InfoPath process, and then click Attach.
4. In the Attach To Process dialog box, select the appropriate check boxes, and then click OK.
5. Click Close.
6. Choose Break All from the Debug menu.
From here you shoud be able to do something in the view which will cause the VS debugger to take charge. Then you can set your breakpoints, etc. as normal.
Greg Collins [InfoPath MVP]
InfoPath Dev