[RESOLVED] Why is my debug opening C# files?
Ok hard to explain this one, it may be the codeproject addin i added recently or its a setting i have changed somewhere but when i'm debugging my app opens up many .cs files, kind of interesting but when i want to step through my code it goes into these files and when it errors it has no reference to where the error actually is. sometimes these files being opened have errors on them which i have had to correct for the code to work.
Has anyone seen this before and what could i do to stop it, i wish to confirm that it is this addon before i remove it (which i will do if it is this addon causing this).
Re: Why is my debug opening C# files?
Could it simply be that the addon you added has been coded in CSharp and that when you debug it goes through its code ?
Can you tell us which CodeProject addon you are using ?
Re: Why is my debug opening C# files?
I had the same thing happen to me mere days ago:
http://www.vbforums.com/showthread.php?t=607226
I needed to check the 'Enable Just My Code' option in the Debugging section.
Re: Why is my debug opening C# files?
sure its called codeproject browser, it is meant to link to codeproject files and they can be downloaded direct into the ide. I guess that it isn't this as it happens. what's happening is if i run code and it generates a runtime error it will open a file thats autogenerated in read only mode and in C#. if i try to step through a project it can load 10 of these files each seems linked to an assembly.
The following code opens the following files if i press F8 to move through the program
Code:
Public Class Form1
Dim mouseFlag As Boolean = False
Private Const WM_NCHITTEST As Integer = &H84
Private Const HTCLIENT As Integer = &H1
Private Const HTCAPTION As Integer = &H2
Dim rgnMain, rgnClose As Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim gp1, gp2, gpClose As New Drawing2D.GraphicsPath
Dim rect As New Rectangle(0, 0, Me.Width, Me.Height)
Dim rect2 As New Rectangle
rect2.X = CInt(Me.Width / 4)
rect2.Y = CInt(Me.Height / 4)
rect2.Width = CInt(Me.Width / 2)
rect2.Height = CInt(Me.Height / 2)
Dim rectClose As New Rectangle(2, 2, 32, 32)
gp1.AddEllipse(rect)
gp1.AddEllipse(rect2)
gp2.AddPie(rect2, 20, 50)
rgnMain = New Region(gp1)
rgnMain.Union(gp2)
gpClose.AddEllipse(rectClose)
rgnMain.Union(gpClose)
rgnClose = New Region(gpClose)
Me.Region = rgnClose
Me.Region = rgnMain
Dim pt As Point = Me.PointToClient(Windows.Forms.Cursor.Position)
'If rgnClose.IsVisible(pt) Then
'Me.Close()
'End If
End Sub
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Dim pt As Point = Me.PointToClient(Windows.Forms.Cursor.Position)
Select m.Msg
Case WM_NCHITTEST
MyBase.WndProc(m)
If (m.Result.ToInt32 = HTCLIENT) Then
m.Result = IntPtr.op_Explicit(HTCAPTION)
End If
Exit Sub
End Select
MyBase.WndProc(m)
If Me.WindowState = FormWindowState.Maximized Then Me.WindowState = FormWindowState.Normal
End Sub
End Class
Control.cs
PropertyStore.cs
FlowControl.cs
WindowsFormsApplicationBase.cs
ScrollableControls.cs
ContainerControls.cs
Form.cs
Message.cs
NativeWindow.cs
UnsafeNativeMethods.cs
Gdiplus.cs
Graphics.cs
HandleCollector.cs
Region.cs
Rectangle.cs
GraphicsPath.cs
these are opened in reverse order btw.
Re: Why is my debug opening C# files?
Quote:
Originally Posted by
NickThissen
now that sounds familiar, something came up in a code analysis so i changed that ;) I kind of like the idea you can get into the nuts and bolts of the ide but while debugging simple code it is a pita :mad: will change that setting now.:thumb:
Re: Why is my debug opening C# files?
yep sure enough thats the one :) thanks again, now i can debug as nature intended lol