Hey , I am wondering which is better to record guitar tracks with. A cable that connects from my amp (Roland Cube 40) to my computer via USB or recording the guitar from the amp with a Microphone. I currently have a Shure SM57 but my XLR to USB cable malfunctioned. So I am wondering whether it would be better to get a new XLR to USB cable or just get a cable that goes from my amp to my computer.
Yes, you need an interface if you are going to direct record your amp.
If you do, it MUST have a line output. You'll feed that into a line capable input on your audio interface.

If you do, you should use a cabinet simulator. I strongly suggest using Impulse Response cab simulation, which are wave files that contain a convolution of an actual real cabinet. It's basically a snapshot of a microphone/cabinet setup.

You can get a IR loader like LeCab. After installing that, find an impulse response you like on the internet and load it onto the cabinet simulator plugin.
Quote by unofficiallyme2
"should" is never good.

Neither is hearing your amp signal raw without a cabinet
Clay-man's spot on; you'll need a cab simulator if you're taking the preamp straight into your computer. It'll sound like a fart through a Brillo pad otherwise!

There are a few out there, so have a look. One I've picked up recently is Wall of Sound III from Two Notes Audio. You have to buy the cabs separately, but the basic program comes with 2 cabs and 8 mics (I think). Check it out - www.two-notes.com/en/

That, or IK Multimedia do a great range of amp and cab sims. That way you can take your dry guitar signal straight in through your interface, and shape all of your tone in the DAW.