94

You can put your Mathematica session in debug mode by going to Evaluation->Debugger Then, make some definitions and wrap the profiled code in RuntimeTools`Profile For example, in debug mode, run f[x_] := x^2 Table[f[x], {100000}]; // RuntimeTools`Profile and you get a nice As @acl mentioned in the comments, clicking in the gray area in the output ...


79

Preamble: Using git to version control your Mathematica projects is a good choice and you will not regret it. However, like with most tools, it has its own learning curve, the difficulty of which will depend on how comfortable you are with using unix style command line tools. While the basics of git are easy to learn and use (especially if you're a single ...


43

Update October 2016: As mentioned here it is officially documented how to install WWB into Eclipse Neon (64 bit)! Great! Thanx WRI. This is tested on Windows and Linux: Download and install a 32bit version of Eclipse Kepler from http://www.eclipse.org/downloads/ On Linux x86_64 make sure to have 32bit Java installed and configured, and, e.g. on Fedora do: ...


26

Preamble I feel that this question deserves an answer, since there are a few subtleties associated with WB development which may not be very well reflected in the WB documentation and can be confusing at first. The mechanics of package search / loading in application projects The standard structure of the WB application project usually contains nested ...


22

There are indeed some open source alternatives, as other posters have suggested, but you will miss the unique facilities of WB to develop state of the art documentation. So if you want to develop some serious work in MMA, for yourself or others, you should seriously consider WB. Having said that, I use WB in a (probably) unconventional way. Within WB you can ...


21

I know that you are thinking ahead and considering how to make the work flow easiest for yourself. Nevertheless, in reading over your question I suspect you are pointed in the wrong direction and will only make things more difficult and burdensome for yourself. What you are talking about is writing Mathematica Applications. (I would start with a single ...


20

Even though documentation indices built with Mathematica 8 or older are not compatible with Mathematica 9, indices built with 9 are compatible with 8 or older. And even though Mathematica 9 can choke up converting documentation notebooks, it has no problems generating documentation indices. So the workaround to points 1 and 4 in the question above is to ...


17

There is also a TextMate bundle for Mathematica: https://github.com/dehowell/mathematica-tmbundle TextMate is for Mac only, but this bundle work in other editors like Sublime Text (multi platform) (windows) Also for Atom (multi platform) there is this: https://github.com/Fitzse/language-mathematica


17

Are you interested in a Wolfram Workbench Update? No, because it is based on Eclipse, and I prefer IntelliJ IDEA. The Mathematica plugin for IntelliJ IDEA is absolutely great and fairly sufficient for what I do. Many of my (ex-)co-workers at WRI use(d) Wolfram Workbench and are(were) productive with it. I never particularly liked it because of Eclipse. (...


17

Preface I feel inclined to answer because I live in both of the worlds you are describing. For one, I work in science where it is more than typical to write software that has sophisticated algorithms under the hood, but cannot be compared to modern apps. This software is rarely "market-ready" in terms of user experience, let alone the principles like web-...


16

This Wolfram support article explains how to install the latest Workbench as an Eclipse plugin. It is compatible with Eclipse 4.6 (Neon) and Mathematica 11. See also https://www.wolfram.com/products/workbench/


15

The solution I am currently using is to work with *.wls script files. You can do nearly all the things you do with usual *.nb notebooks files (as shown in my screen shot). The big advantage is that outputs and graphics are not saved into these *.wls files (you have to click on Run All Code to regenerate them). By consequence you can use git as usual (...


15

Update November 2nd, 2016 The issue has obviously now been addressed by WRI and Workbench will not be a branded Eclipse IDE, but rather be a concurrent plug-in for Eclipse. They also updated the Website: Wolfram Workbench. Maybe there has been some effect of posts like this one? :) Update Because I feel that @Szabolcs does have a point I will give a ...


13

If you can settle for anything other than Workbench's Profile, here is a simplistic profiler function with a fairly low latency: ClearAll[profile]; SetAttributes[profile, HoldAll]; profile[code_] := Block[{$totalTime = 0, t, res, time,exclude}, SetAttributes[{time, exclude}, HoldAll]; exclude[cd_] := (t = AbsoluteTime[];res = cd; $...


13

You can enter arbitrary expressions in the Expressions debugging view: The function VariableValue must be used in such expressions in order to access any active variables. If the Expressions view is not visible, you can open it from the Workbench main menu using Window / Show View... / Expressions.


13

A new possibility is to use mathematica-notebook-filter which parses Mathematica notebooks and strips all output cells and metadata so that these are not committed into the version control system. In the specific case of git, it is quite easy to integrate mathematica-notebook-filter so that git automatically cleans the output and metadata when calculating ...


13

Update 4: The code in this answer has been incorporated into @jkuczm's WWBCommon package. I encourage everyone creating cross-version documentation in Workbench to use it. This is a workaround for Point 5 in the question, allowing cross-version documentation to be built that fixes the layout and text problems in version 9 (and 10), while still displaying ...


13

Edit From version 9 PacletInfo.m file requires "Kernel" extension with Context specification. Without it loading paclets using contexts doesn't work (see old answer). Up to version 8 $Path has precedence over paclet search path no matter how package is loaded. In versions 9.0 - 10.1 paclet search path has precedence over $Path no matter how package is ...


12

I installed it for a short while, played with it somewhat and then decided it was not for me. I have been using IDEs for various languages and environments, but my development style for Mathematica programs just doesn't work in an IDE. I don't write huge programs, but mostly use Mathematica as a research tool, test concepts or do some data processing. ...


12

Update 10-2017: I noticed that they released an update of these tools, so some of these steps are outdated. I adjusted this answer to the newest release of Workbench 10.1.822. It has become somewhat easier, therefore I also created an automated script for my usecase. Feel free to use it: (* Directory containing html folder, e.g. C:/project/build/...


11

Thanks to @acl's link, I found the hot key combination: CtrlShift/, which launches the browser and navigates to the Mathematica documentation website.


11

This is a workaround for point 2 and 5 in the question, suppressing the "This notebook was created in a more recent version of Mathematica" dialog warnings and improving the rendering of the MORE INFORMATION button a bit. The idea here is to do an Ant search-and-replace after building the doc notebooks, replacing and removing the bits in the notebooks we ...


11

Alternatively, is it possible to build the documentation directly from Mathematica, without having to use Ant and docbuild.xml? The Workbench includes a DocumentationBuild package. Yes this is possible, but it requires tracing what docbuild.xml is doing. It's deleting build directory at beginning, and copying PacletInfo.m and everything, except */Guides/**, ...


10

This problem exists because WB encourages you to edit the .m file directly. If you created and edited an .nb (package) file -which automatically creates and updates a .m file - this problem (and others) would not exist. Indeed, if you work with the .nb (package) file you have all the cell organizational/styling facilities available. So when I recently ...


10

The default directory is $UserAddOnsDirectory/Applications and in MacOSX and Linux you see the target folder every time you click on Deploy Application.


10

This is a workaround for point 3 in the question, making PacletInfo.m files for Mathematica 9 also work on 6. Due to a change in the PacletManager in Mathematica 9, PacletInfo files need an additional line in order for PacletManager to parse them completely. Here's an example: Paclet[ Name -> "xTras", Version -> "1.1.3", ...


10

While some have pointed out that many of your questions apply to all programming environments. I do think Mathematica's immediacy provides some interesting ways to approach development projects at every scale. Some ideas follow. Wolfram Workbench -- If memory serves, Wolfram Workbench sits on top of Eclipse. Version control -- CVS provides a useful open ...


10

I'll try to answer this as objectively as possible, but note that this answer is shaped by my experiences, so there is a certain subjective flavour to it. Before you try to figure out a workflow for a non-interactive IDE for Mathematica such as the WorkBench/vim/IntelliJ/Eclipse (henceforth, IDE) and the Mathematica notebook (NB), you should evaluate and ...


10

I don't know any option that would control this behavior, but there are hacks that can completely prevent this rasterization. Rasterization is performed by ConvertGraphicsToBitmaps function from DocumentationBuild`Common` package. This function performs rasterization of output cells from given NotebookObject and returns Null, that's all it does, so we can ...


10

For notebook to stay in the same place, after Revert action, it needs Saveable -> False option. Note: A notebook with Saveable -> False cannot be saved using the GUI through File -> Save... It can be saved programmatically using NotebookSave, or exported using Export[..., "NB"], etc. Let's create basic test application with documentation support: ...


Only top voted, non community-wiki answers of a minimum length are eligible