Forums

New version of MonoDevelop addin

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

New version of MonoDevelop addin

Postby nerdzero » Sat Sep 22, 2012 3:23 pm

The addin has been rewritten in Cobra and now supports debugging on Windows 64-bit by compiling to 32-bit. Since the MonoDevelop binaries provided for Windows are 32-bit, some of the libraries can't be loaded unless you re-install Cobra as 32-bit also. Additionally, in this new version, you can set some compiler options now via the Project > Options > Compiler menu in MonoDevelop.

You can check the README file on the GitHub repository (https://github.com/ramon-rocha/MonoDevelop.CobraBinding) for instructions but I will also put them here. The instructions say you need Cobra 0.9 but actually 0.8-svn-2798 (latest as of this post) will do so make sure you are using at least that version of Cobra.

If you're not on Windows 64-bit, just download the addin and run the installer program. This will compile and install the addin.
Code: Select all
cobra install.cobra


If you are on Windows 64-bit, open a VS or Windows SDK command prompt window as an administrator. Then, remove the existing Cobra.Core GAC entry.
Code: Select all
gacutil /u Cobra.Core

Next, set your system to use the 32-bit CLR
Code: Select all
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe setwow

Then install Cobra using the -x86 option
Code: Select all
cd\<path\to\cobra\workspace>\Source
bin\install-from-workspace.bat -x86

Restore your CLR to 64-bit default
Code: Select all
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe set64

Then, install the addin targetting the x86 platform.
Code: Select all
cobra -clr-platform:x86 install.cobra


Feel free to post any issues you encounter here or on the addin issues list: https://github.com/ramon-rocha/MonoDeve ... ing/issues

The next feature on the chopping block is a parser/AST visitor which is the first step in supporting autocompletion.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: New version of MonoDevelop addin

Postby Charles » Sat Sep 22, 2012 4:56 pm

This is awesome. Thanks very much for your hard work on this.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: New version of MonoDevelop addin

Postby Charles » Sun Sep 23, 2012 10:25 pm

I've tested on Ubuntu. Before running "install.cobra" I needed to make two directories:

Code: Select all
cd MonoDevelop.CobraBinding
mkdir CobraBinding/bin
mkdir CobraBinding/bin/Debug
sudo cobra install.cobra


Also, for Ubuntu users, I have documented the explicit commands for obtaining MonoDevelop 3.x. on the MonoDevelop wiki page. For Mac and Windows users, you can just download that version from the MonoDevelop site.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: New version of MonoDevelop addin

Postby torial » Mon Sep 24, 2012 8:32 am

Excellent -- keep it up.

EDIT: You should call the release: "Frodo Lives" since you timed it for his B-day.
torial
 
Posts: 229
Location: IA

Re: New version of MonoDevelop addin

Postby nerdzero » Mon Sep 24, 2012 7:33 pm

Fixed the issue with the bin/Debug folders. You shouldn't need to use sudo when running install.cobra as it installs under your home directory and does not modify the GAC. Let me know if this is not the case.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: New version of MonoDevelop addin

Postby DelphiGuy » Tue Oct 02, 2012 10:27 am

I hereby announce that with quite a bit of tech support from nerdzero regarding his MD/Cobra add-in, I am now able to set MD/Win7/Cobra breakpoints and debug.

Nice job and thank you, nerdzero. Uh, er, I mean: nice job, "coolten".
DelphiGuy
 
Posts: 116

Re: New version of MonoDevelop addin

Postby nerdzero » Tue Oct 02, 2012 10:43 am

Huzzah! Glad to hear it. Lucky for you in addition to coding I provide tech support to Engineers and Designers in my day job so I have a lot of troubleshooting experience :geek:
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: New version of MonoDevelop addin

Postby DelphiGuy » Tue Oct 09, 2012 2:28 pm

NerdZero:

Didn't I see somewhere in these discussions that, in MD, you had been able to easily view the C# code output by Cobra? If so, how do I do that, please?

Having an integrated debugger for Cobra in MD is very, very cool. Did I mention "very"?
DelphiGuy
 
Posts: 116

Re: New version of MonoDevelop addin

Postby nerdzero » Tue Oct 09, 2012 3:03 pm

I wouldn't say "easily view" more like "accidentally view."

If I remember correctly, I added a reference to a Cobra generated DLL. Then I double-clicked on it by accident in the left-pane (Solution Explorer?). That opened up the 'Assembly Browser' and let me browse through the namespaces and classes provided by the referenced assembly. I'm not sure how it generates this code. From the PDB or MDB files maybe? I don't think you can open any assembly from the browser though. I think it only shows you those that your project references so you may have to add a reference to the exe or dll file in your bin/Debug file if you wanted to play with this.

Alternatively, you can try using the "Keep Intermediate Files" option by right-clicking your project and going to Options > Build > Compiler. It is under the "Development and Deployment Options" section. I only tested it once but it worked for me when I tried it. That code will look different though as it is actually created by the Cobra compiler as opposed to however the MonoDevelop Assembly Browser figures it out.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: New version of MonoDevelop addin

Postby torial » Tue Oct 09, 2012 3:16 pm

The IL that the .Net app is compiled down to can be decompiled (using ILSpy or Cecil for example) into .Net code -- usually there will be some compile errors if you take a decompiled set of source code.. but it is 98% or so there. PDB primarily is for debugging symbol information.
torial
 
Posts: 229
Location: IA

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 32 guests