Debug Serializers (driving me nuts)

I switched to Ember-Cli from a plain old Ember application.

The problem is that my models are not being properly serialized.

How can I debug all serializers to see what is going on?

  • The application serializer
  • The adapter serializer
  • The model serializer

Can I for example do this with a console.log in custom adapters createRecord() function?


Ok, i got this working. First I had to generate a serializer with ember-cli

ember generate serializer application

And then I simply added this to ensure it’s working.

import DS from 'ember-data';

    export default DS.RESTSerializer.extend({
    	serialize: function(record, options) {
    	    this._super(record, options);

I a still curious if there was another way to do this :slight_smile:

Creating the serializer was exactly what you needed to do, afaik (as Ember won’t create one automatically). You can remove the serialize function though, no longer serves a purpose.

Curious, where would a console.log in the serializer show up anyway?

Tried this, didn’t work. Can’t figure out how to debug serializers/adapters either, would be nice to have more control over the process, having hooks like normalize() is nice, but if I cant’t see what is going on when this hooks are called (also to check if they are called), makes things difficult to debug.